commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
59e44a3ff36e0a67cd39c8e3149d2fdaa089b7d4
src/log_thread.h
src/log_thread.h
// // log_thread.h // #ifndef log_thread_h #define log_thread_h #include "queue_atomic.h" struct log_thread; typedef std::shared_ptr<log_thread> log_thread_ptr; #define LOG_BUFFER_SIZE 1024 struct log_thread : std::thread { static const bool debug; static const int flush_interval_msecs; FILE* file; const size_t num_buffers; queue_atomic<char*> log_buffers_free; queue_atomic<char*> log_buffers_inuse; time_t last_time; std::atomic<bool> running; std::atomic<bool> writer_waiting; std::thread thread; std::mutex log_mutex; std::condition_variable log_cond; std::condition_variable writer_cond; log_thread(int fd, size_t num_buffers); virtual ~log_thread(); void shutdown(); void create_buffers(); void delete_buffers(); void log(time_t current_time, const char* message); void write_logs(); void mainloop(); }; #endif
// // log_thread.h // #ifndef log_thread_h #define log_thread_h #include "queue_atomic.h" struct log_thread; typedef std::shared_ptr<log_thread> log_thread_ptr; #define LOG_BUFFER_SIZE 1024 struct log_thread : std::thread { static const bool debug; static const int flush_interval_msecs; FILE* file; const size_t num_buffers; queue_atomic<char*> log_buffers_free; queue_atomic<char*> log_buffers_inuse; time_t last_time; std::atomic<bool> running; std::atomic<bool> writer_waiting; std::mutex log_mutex; std::condition_variable log_cond; std::condition_variable writer_cond; std::thread thread; log_thread(int fd, size_t num_buffers); virtual ~log_thread(); void shutdown(); void create_buffers(); void delete_buffers(); void log(time_t current_time, const char* message); void write_logs(); void mainloop(); }; #endif
Fix thread initialisation race (thread sanitizer)
Fix thread initialisation race (thread sanitizer)
C
isc
metaparadigm/latypus,metaparadigm/latypus,metaparadigm/latypus,metaparadigm/latypus
b650f4bc8e04662493546c8ab2ab0fbca1081dac
iree/tools/init_xla_dialects.h
iree/tools/init_xla_dialects.h
// Copyright 2020 The IREE Authors // // Licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // This files defines a helper to trigger the registration of dialects to // the system. #ifndef IREE_TOOLS_INIT_XLA_DIALECTS_H_ #define IREE_TOOLS_INIT_XLA_DIALECTS_H_ #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h" #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h" #include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h" #include "mlir/IR/Dialect.h" namespace mlir { // Add all the XLA dialects to the provided registry. inline void registerXLADialects(DialectRegistry &registry) { // clang-format off registry.insert<mlir::chlo::HloClientDialect, mlir::lmhlo::LmhloDialect, mlir::mhlo::MhloDialect>(); // clang-format on } } // namespace mlir #endif // IREE_TOOLS_INIT_XLA_DIALECTS_H_
// Copyright 2020 The IREE Authors // // Licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // This files defines a helper to trigger the registration of dialects to // the system. #ifndef IREE_TOOLS_INIT_XLA_DIALECTS_H_ #define IREE_TOOLS_INIT_XLA_DIALECTS_H_ #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h" #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h" #include "mlir/IR/Dialect.h" namespace mlir { // Add all the XLA dialects to the provided registry. inline void registerXLADialects(DialectRegistry &registry) { // clang-format off registry.insert<mlir::chlo::HloClientDialect, mlir::mhlo::MhloDialect>(); // clang-format on } } // namespace mlir #endif // IREE_TOOLS_INIT_XLA_DIALECTS_H_
Move the lhlo dialect into its own directory.
Move the lhlo dialect into its own directory. Also remove it from registerAllMhloDialects and make registrations explicit. PiperOrigin-RevId: 412411838
C
apache-2.0
iree-org/iree,iree-org/iree,google/iree,google/iree,google/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,google/iree,iree-org/iree,iree-org/iree,google/iree,iree-org/iree
57f2821f8ed183036e61f76a8b2fefcc1a1f1cbd
src/morphology/mainhelper2.h
src/morphology/mainhelper2.h
#include <iostream> #include <vector> #include <string> #include "erosion.h" #include "dilation.h" #include "opening.h" #include "closing.h" #include "gradient.h" /** run: A macro to call a function. */ #define run( function, ctype, dim ) \ if ( operation == #function ) \ { \ if ( componentType == #ctype && Dimension == dim ) \ { \ typedef itk::Image< ctype, dim > ImageType; \ if ( type == "grayscale" ) \ { \ function##Grayscale< ImageType >( inputFileName, outputFileName, radius, boundaryCondition, useCompression ); \ supported = true; \ } \ else if ( type == "binary" ) \ { \ function##Binary< ImageType >( inputFileName, outputFileName, radius, bin, useCompression ); \ supported = true; \ } \ else if ( type == "parabolic" ) \ { \ function##Parabolic< ImageType >( inputFileName, outputFileName, radius, useCompression ); \ supported = true; \ } \ } \ } /** run2: A macro to call a function. */ #define run2( function, ctype, dim ) \ if ( operation == #function ) \ { \ if ( componentType == #ctype && Dimension == dim ) \ { \ typedef itk::Image< ctype, dim > ImageType; \ function< ImageType >( inputFileName, outputFileName, radius, algorithm, useCompression ); \ supported = true; \ } \ }
#include <iostream> #include <vector> #include <string> #include "erosion.h" #include "dilation.h" #include "opening.h" #include "closing.h" #include "gradient.h" /** run: A macro to call a function. */ #define run( function, ctype, dim ) \ if ( operation == #function ) \ { \ if ( componentType == #ctype && Dimension == dim ) \ { \ typedef itk::Image< ctype, dim > ImageType; \ if ( type == "grayscale" ) \ { \ function##Grayscale< ImageType >( inputFileName, outputFileName, radius, boundaryCondition, useCompression ); \ supported = true; \ } \ else if ( type == "binary" ) \ { \ function##Binary< ImageType >( inputFileName, outputFileName, radius, bin, useCompression ); \ supported = true; \ } \ else if ( type == "parabolic" ) \ { \ function##Parabolic< ImageType >( inputFileName, outputFileName, radius, useCompression ); \ supported = true; \ } \ } \ } /** run2: A macro to call a function. */ #define run2( function, ctype, dim ) \ if ( operation == #function ) \ { \ if ( componentType == #ctype && Dimension == dim ) \ { \ typedef itk::Image< ctype, dim > ImageType; \ function< ImageType >( inputFileName, outputFileName, radius, algorithm, useCompression ); \ supported = true; \ } \ }
Fix backslash warning from missing blank line at end of file
Fix backslash warning from missing blank line at end of file
C
apache-2.0
ITKTools/ITKTools,ITKTools/ITKTools,ITKTools/ITKTools,sderaedt/ITKTools,sderaedt/ITKTools,sderaedt/ITKTools,sderaedt/ITKTools,sderaedt/ITKTools,ITKTools/ITKTools
a3e8d4a968060536e210ac5dc177cd097d7df774
lib/interception/interception_win.h
lib/interception/interception_win.h
//===-- interception_linux.h ------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of AddressSanitizer, an address sanity checker. // // Windows-specific interception methods. //===----------------------------------------------------------------------===// #ifdef _WIN32 #if !defined(INCLUDED_FROM_INTERCEPTION_LIB) # error "interception_win.h should be included from interception library only" #endif #ifndef INTERCEPTION_WIN_H #define INTERCEPTION_WIN_H namespace __interception { // returns true if the old function existed, false on failure. bool OverrideFunction(uptr old_func, uptr new_func, uptr *orig_old_func); } // namespace __interception #if defined(_DLL) # define INTERCEPT_FUNCTION_WIN(func) \ ::__interception::GetRealFunctionAddress( \ #func, (::__interception::uptr*)&REAL(func)) #else # define INTERCEPT_FUNCTION_WIN(func) \ ::__interception::OverrideFunction( \ (::__interception::uptr)func, \ (::__interception::uptr)WRAP(func), \ (::__interception::uptr*)&REAL(func)) #endif #define INTERCEPT_FUNCTION_VER_WIN(func, symver) \ INTERCEPT_FUNCTION_WIN(func) #endif // INTERCEPTION_WIN_H #endif // _WIN32
//===-- interception_linux.h ------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of AddressSanitizer, an address sanity checker. // // Windows-specific interception methods. //===----------------------------------------------------------------------===// #ifdef _WIN32 #if !defined(INCLUDED_FROM_INTERCEPTION_LIB) # error "interception_win.h should be included from interception library only" #endif #ifndef INTERCEPTION_WIN_H #define INTERCEPTION_WIN_H namespace __interception { // returns true if the old function existed, false on failure. bool OverrideFunction(uptr old_func, uptr new_func, uptr *orig_old_func); } // namespace __interception #if defined(_DLL) # error Not implemented yet #else # define INTERCEPT_FUNCTION_WIN(func) \ ::__interception::OverrideFunction( \ (::__interception::uptr)func, \ (::__interception::uptr)WRAP(func), \ (::__interception::uptr*)&REAL(func)) #endif #define INTERCEPT_FUNCTION_VER_WIN(func, symver) \ INTERCEPT_FUNCTION_WIN(func) #endif // INTERCEPTION_WIN_H #endif // _WIN32
Remove one more reference to __interception::GetRealFunctionAddress (follow-up to r215707)
[ASan/Win] Remove one more reference to __interception::GetRealFunctionAddress (follow-up to r215707) git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@215722 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
40206332871e11ee28c6d163797cb374da2663e9
src/python/pylogger.h
src/python/pylogger.h
#ifndef PYLOGGER_H #define PYLOGGER_H #include "Python.h" #include <string> #include "cantera/base/logger.h" namespace Cantera { /// Logger for Python. /// @ingroup textlogs class Py_Logger : public Logger { public: Py_Logger() { PyRun_SimpleString("import sys"); } virtual ~Py_Logger() {} virtual void write(const std::string& s) { std::string ss = "sys.stdout.write(\"\"\""; ss += s; ss += "\"\"\")"; PyRun_SimpleString(ss.c_str()); PyRun_SimpleString("sys.stdout.flush()"); } virtual void error(const std::string& msg) { std::string err = "raise \""+msg+"\""; PyRun_SimpleString((char*)err.c_str()); } }; } #endif
#ifndef PYLOGGER_H #define PYLOGGER_H #include "Python.h" #include <string> #include "cantera/base/logger.h" namespace Cantera { /// Logger for Python. /// @ingroup textlogs class Py_Logger : public Logger { public: Py_Logger() { PyRun_SimpleString("import sys"); } virtual ~Py_Logger() {} virtual void write(const std::string& s) { std::string ss = "sys.stdout.write(\"\"\""; ss += s; ss += "\"\"\")"; PyRun_SimpleString(ss.c_str()); PyRun_SimpleString("sys.stdout.flush()"); } virtual void error(const std::string& msg) { std::string err = "raise Exception(\"\"\""+msg+"\"\"\")"; PyRun_SimpleString(err.c_str()); } }; } #endif
Fix Py_Logger to raise instances of Exception instead of strings
Fix Py_Logger to raise instances of Exception instead of strings Raising string exceptions was removed in Python 2.6 git-svn-id: e76dbe14710aecee1ad27675521492cea2578c83@1932 02a645c2-efd0-11dd-984d-ab748d24aa7e
C
bsd-3-clause
Cantera/cantera-svn,Cantera/cantera-svn,Cantera/cantera-svn,Cantera/cantera-svn,Cantera/cantera-svn,Cantera/cantera-svn
bc7bad10693b5c6616a424ff64278a6eeb8925da
folly/CompiledFormat.h
folly/CompiledFormat.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <fmt/compile.h> // Fallback to runtime format string processing for compatibility with fmt 6.x. #ifndef FMT_COMPILE #define FMT_COMPILE(format_str) format_str #endif
/* * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <fmt/compile.h> #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 8 // Forcefully disable compiled format strings for GCC 8 & below until fmt is // updated to do this automatically. #undef FMT_COMPILE #endif // Fallback to runtime format string processing for compatibility with fmt 6.x. #ifndef FMT_COMPILE #define FMT_COMPILE(format_str) format_str #endif
Disable compiled format for GCC 8 & below
Disable compiled format for GCC 8 & below Summary: As per title, as fmt doesn't currently handle them well. Reviewed By: vitaut Differential Revision: D26004515 fbshipit-source-id: dbbd1e6550fa10c4a6fcb0fc5597887c9411ca70
C
apache-2.0
facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly
7eae3515be77d87d54f7a1b42cc53cb936e3ede3
components/DataportTest/src/client.c
components/DataportTest/src/client.c
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #include <camkes.h> #include <stdio.h> #include <string.h> #include <sel4/sel4.h> int run(void) { char *shello = "hello world"; printf("Starting...\n"); printf("-----------\n"); strcpy((void*)DataOut, shello); while(!*((char*)DataIn)) seL4_Yield(); printf("%s read %s\n", get_instance_name(), (char*)DataIn); return 0; }
/* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #include <camkes.h> #include <stdio.h> #include <string.h> int run(void) { char *shello = "hello world"; printf("Starting...\n"); printf("-----------\n"); strcpy((void*)DataOut, shello); while(!*((volatile char*)DataIn)); printf("%s read %s\n", get_instance_name(), (char*)DataIn); return 0; }
Remove casting away of volatile and explicit call to seL4_Yield.
Remove casting away of volatile and explicit call to seL4_Yield. This commit removes some bad style in this example. In particular, calling a seL4 system call directly from a CAmkES component is not intended. Additionally this example cast away the volatility of the dataport pointer. From what I can see, the only reason the compiler did not optimise away the repeated read of this pointer was because the loop contained a system call with a contained unrestricted memory clobber. Related to JIRA CAMKES-436
C
bsd-2-clause
seL4/camkes-apps-dataport--devel
be3f8ddf0f51e601866dbcc1a3fcac6d0db14e39
gc_none.c
gc_none.c
#include "visibility.h" #include "objc/runtime.h" #include "gc_ops.h" #include "class.h" #include <stdlib.h> #include <stdio.h> static id allocate_class(Class cls, size_t extraBytes) { intptr_t *addr = calloc(cls->instance_size + extraBytes + sizeof(intptr_t), 1); return (id)(addr + 1); } static void free_object(id obj) { free((void*)(((intptr_t)obj) - 1)); } static void *alloc(size_t size) { return calloc(size, 1); } PRIVATE struct gc_ops gc_ops_none = { .allocate_class = allocate_class, .free_object = free_object, .malloc = alloc, .free = free }; PRIVATE struct gc_ops *gc = &gc_ops_none; PRIVATE BOOL isGCEnabled = NO; #ifndef ENABLE_GC PRIVATE void enableGC(BOOL exclusive) { fprintf(stderr, "Attempting to enable garbage collection, but your" "Objective-C runtime was built without garbage collection" "support\n"); abort(); } #endif
#include "visibility.h" #include "objc/runtime.h" #include "gc_ops.h" #include "class.h" #include <stdlib.h> #include <stdio.h> static id allocate_class(Class cls, size_t extraBytes) { intptr_t *addr = calloc(cls->instance_size + extraBytes + sizeof(intptr_t), 1); return (id)(addr + 1); } static void free_object(id obj) { free((void*)(((intptr_t*)obj) - 1)); } static void *alloc(size_t size) { return calloc(size, 1); } PRIVATE struct gc_ops gc_ops_none = { .allocate_class = allocate_class, .free_object = free_object, .malloc = alloc, .free = free }; PRIVATE struct gc_ops *gc = &gc_ops_none; PRIVATE BOOL isGCEnabled = NO; #ifndef ENABLE_GC PRIVATE void enableGC(BOOL exclusive) { fprintf(stderr, "Attempting to enable garbage collection, but your" "Objective-C runtime was built without garbage collection" "support\n"); abort(); } #endif
Fix bug spotted by Justin Hibbits.
Fix bug spotted by Justin Hibbits.
C
mit
ngrewe/libobjc2,gnustep/libobjc2,davidchisnall/libobjc2,crystax/android-vendor-libobjc2,ngrewe/libobjc2,crystax/android-vendor-libobjc2,gnustep/libobjc2,darlinghq/darling-libobjc2,davidchisnall/libobjc2,darlinghq/darling-libobjc2
151e30567b407381af5134c9f5c3d782bf80c3e2
src/core/lib/security/security_connector/load_system_roots.h
src/core/lib/security/security_connector/load_system_roots.h
/* * * Copyright 2018 gRPC authors. * * 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 GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_LOAD_SYSTEM_ROOTS_H #define GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_LOAD_SYSTEM_ROOTS_H namespace grpc_core { // Returns a slice containing roots from the OS trust store grpc_slice LoadSystemRootCerts(); } // namespace grpc_core #endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_LOAD_SYSTEM_ROOTS_H */
/* * * Copyright 2018 gRPC authors. * * 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 GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_LOAD_SYSTEM_ROOTS_H #define GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_LOAD_SYSTEM_ROOTS_H namespace grpc_core { // Returns a slice containing roots from the OS trust store grpc_slice LoadSystemRootCerts(); } // namespace grpc_core #endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_LOAD_SYSTEM_ROOTS_H */
Add newline to end of header
Add newline to end of header
C
apache-2.0
muxi/grpc,grpc/grpc,carl-mastrangelo/grpc,ejona86/grpc,vjpai/grpc,muxi/grpc,stanley-cheung/grpc,stanley-cheung/grpc,mehrdada/grpc,grpc/grpc,sreecha/grpc,jboeuf/grpc,jtattermusch/grpc,jboeuf/grpc,carl-mastrangelo/grpc,grpc/grpc,carl-mastrangelo/grpc,firebase/grpc,ejona86/grpc,ejona86/grpc,ctiller/grpc,ctiller/grpc,pszemus/grpc,muxi/grpc,nicolasnoble/grpc,carl-mastrangelo/grpc,donnadionne/grpc,jboeuf/grpc,firebase/grpc,ejona86/grpc,muxi/grpc,firebase/grpc,vjpai/grpc,ctiller/grpc,ejona86/grpc,vjpai/grpc,thinkerou/grpc,sreecha/grpc,ejona86/grpc,vjpai/grpc,grpc/grpc,mehrdada/grpc,jboeuf/grpc,carl-mastrangelo/grpc,grpc/grpc,pszemus/grpc,ctiller/grpc,carl-mastrangelo/grpc,pszemus/grpc,jboeuf/grpc,ejona86/grpc,donnadionne/grpc,muxi/grpc,carl-mastrangelo/grpc,ctiller/grpc,firebase/grpc,pszemus/grpc,stanley-cheung/grpc,carl-mastrangelo/grpc,grpc/grpc,sreecha/grpc,pszemus/grpc,stanley-cheung/grpc,donnadionne/grpc,donnadionne/grpc,mehrdada/grpc,vjpai/grpc,jboeuf/grpc,jtattermusch/grpc,muxi/grpc,sreecha/grpc,ctiller/grpc,mehrdada/grpc,thinkerou/grpc,nicolasnoble/grpc,nicolasnoble/grpc,stanley-cheung/grpc,donnadionne/grpc,ctiller/grpc,stanley-cheung/grpc,grpc/grpc,ejona86/grpc,stanley-cheung/grpc,thinkerou/grpc,mehrdada/grpc,mehrdada/grpc,firebase/grpc,stanley-cheung/grpc,donnadionne/grpc,thinkerou/grpc,nicolasnoble/grpc,firebase/grpc,donnadionne/grpc,jtattermusch/grpc,vjpai/grpc,pszemus/grpc,thinkerou/grpc,jtattermusch/grpc,mehrdada/grpc,thinkerou/grpc,thinkerou/grpc,jtattermusch/grpc,jboeuf/grpc,muxi/grpc,firebase/grpc,jboeuf/grpc,stanley-cheung/grpc,mehrdada/grpc,sreecha/grpc,vjpai/grpc,nicolasnoble/grpc,carl-mastrangelo/grpc,ctiller/grpc,donnadionne/grpc,ejona86/grpc,grpc/grpc,muxi/grpc,ctiller/grpc,mehrdada/grpc,muxi/grpc,nicolasnoble/grpc,nicolasnoble/grpc,ejona86/grpc,firebase/grpc,jtattermusch/grpc,jtattermusch/grpc,vjpai/grpc,carl-mastrangelo/grpc,carl-mastrangelo/grpc,mehrdada/grpc,vjpai/grpc,thinkerou/grpc,mehrdada/grpc,carl-mastrangelo/grpc,pszemus/grpc,donnadionne/grpc,sreecha/grpc,grpc/grpc,muxi/grpc,vjpai/grpc,pszemus/grpc,thinkerou/grpc,sreecha/grpc,jboeuf/grpc,jtattermusch/grpc,nicolasnoble/grpc,sreecha/grpc,ctiller/grpc,nicolasnoble/grpc,ejona86/grpc,muxi/grpc,firebase/grpc,pszemus/grpc,mehrdada/grpc,stanley-cheung/grpc,donnadionne/grpc,jtattermusch/grpc,pszemus/grpc,grpc/grpc,sreecha/grpc,thinkerou/grpc,nicolasnoble/grpc,ctiller/grpc,pszemus/grpc,thinkerou/grpc,stanley-cheung/grpc,jtattermusch/grpc,sreecha/grpc,ctiller/grpc,ejona86/grpc,jtattermusch/grpc,firebase/grpc,thinkerou/grpc,muxi/grpc,jtattermusch/grpc,nicolasnoble/grpc,sreecha/grpc,jboeuf/grpc,donnadionne/grpc,firebase/grpc,jboeuf/grpc,vjpai/grpc,firebase/grpc,grpc/grpc,nicolasnoble/grpc,donnadionne/grpc,pszemus/grpc,vjpai/grpc,stanley-cheung/grpc,sreecha/grpc,grpc/grpc,jboeuf/grpc
58de6ed0ccc6b3749c3ddd0d7be44b81eb440cf9
inc/spu.h
inc/spu.h
#ifndef __SPU_H__ #define __SPU_H__ typedef enum { NONE, VOLUME, COMPRESSOR, DISTORTION, OVERDRIVE, DELAY, REVERB, FLANGER, EQULIZER, BACK, EFFECT_TYPE_NUM } EffectType_t; void SignalProcessingUnit(void const * argument); void attachNewEffect(uint32_t stage, EffectType_t effectType); void demolishEffect(uint32_t stage); #endif //__SPU_H__
#ifndef __SPU_H__ #define __SPU_H__ typedef enum { NONE, VOLUME, COMPRESSOR, DISTORTION, OVERDRIVE, DELAY, REVERB, FLANGER, EQULIZER, EFFECT_TYPE_NUM } EffectType_t; void SignalProcessingUnit(void const * argument); void attachEffect(uint32_t stage, EffectType_t effectType); const char *cvtToEffectName(EffectType_t ee); #endif //__SPU_H__
Add Function to get avaliable Effect name
Add Function to get avaliable Effect name
C
mit
sonicyang/uRock,sonicyang/uRock,BeyondCloud/uRock,sonicyang/uRock,BeyondCloud/uRock,BeyondCloud/uRock,BeyondCloud/uRock,sonicyang/uRock
651603c57e8818a492b59cbaa49f8fc5a27d1566
main.c
main.c
#include "siphash.h" #include <stdio.h> int main(void) { uint64_t k0 = 0x0706050403020100ull; uint64_t k1 = 0x0f0e0d0c0b0a0908ull; uint8_t msg[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e}; uint64_t s = siphash24(k0, k1, msg, sizeof(msg)); printf("SipHash-2-4 test: 0x%016llx (expected 0x%016llx)\n", s, 0xa129ca6149be45e5ull); return 0; }
#include "siphash.h" #include <stdio.h> int main(void) { uint8_t key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; uint64_t k0 = *(uint64_t*)(key + 0); uint64_t k1 = *(uint64_t*)(key + 8); uint8_t msg[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e}; uint64_t s = siphash24(k0, k1, msg, sizeof(msg)); printf("SipHash-2-4 test: 0x%016llx (expected 0x%016llx)\n", s, 0xa129ca6149be45e5ull); return 0; }
Fix test key initialization to be endian-neutral
Fix test key initialization to be endian-neutral Signed-off-by: Gregory Petrosyan <60f6837da39a129899062fdb5e652b06dce7deb5@gmail.com>
C
mit
flyingmutant/siphash
3236ff1f1c85e35d99aba3c94092a665717964ef
lb_matrix.h
lb_matrix.h
#ifndef LB_MATRIX_INCLUDED typedef struct { double* data; unsigned int num_rows; unsigned int num_cols; } Matrix; Matrix lb_create_matrix(double* data, unsigned int num_rows, unsigned int num_cols); Matrix lb_allocate_matrix(unsigned int num_rows, unsigned int num_cols); #define lb_mat_element_ptr(A,i,j) (A.data + j * A.num_cols + i) #define lb_mat_element(A,i,j) A.data[j * A.num_cols + i] #define lb_mat_row_element(A,row,offset) A.data[offset + row * A.num_cols] #define lb_mat_col_element(A,col,offset) A.data[col + offset * A.num_cols] #define lb_vec_element_ptr(v,j) v.data + j; void lbmm(Matrix A, Matrix B, Matrix result); void lbma(Matrix A, Matrix B, Matrix result); #define LB_MATRIX_INCLUDED #endif
#ifndef LB_MATRIX_INCLUDED typedef struct { double* data; unsigned int num_rows; unsigned int num_cols; } Matrix; Matrix lb_create_matrix(double* data, unsigned int num_rows, unsigned int num_cols); Matrix lb_allocate_matrix(unsigned int num_rows, unsigned int num_cols); #define lb_mat_element_ptr(A,i,j) (A.data + j * A.num_cols + i) #define lb_mat_element(A,i,j) A.data[j * A.num_cols + i] #define lb_mat_row_element(A,i,j) A.data[i * A.num_cols + j] #define lb_mat_col_element(A,i,j) A.data[j * A.num_cols + i] #define lb_vec_element_ptr(v,j) v.data + j; void lbmm(Matrix A, Matrix B, Matrix result); void lbma(Matrix A, Matrix B, Matrix result); #define LB_MATRIX_INCLUDED #endif
Clarify row and column iterators
Clarify row and column iterators
C
apache-2.0
frenchrd/laid-back-lapack,frenchrd/laid-back-lapack
c89b58e65cce5113ba2d8d8ce531152da23670c9
lib/debug.c
lib/debug.c
#include <ctype.h> #include <stdio.h> #include "debug.h" #ifndef NDEBUG const char * const col[] = {MAG, RED, YEL, CYN, BLU, GRN}; regex_t _comp; // Initialize the regular expression used for restricting debug output static void __attribute__((constructor)) premain() { if (regcomp(&_comp, DCOMPONENT, REG_EXTENDED | REG_ICASE | REG_NOSUB)) die("may not be a valid regexp: %s", DCOMPONENT); } // And free is again static void __attribute__((destructor)) postmain() { regfree(&_comp); } // Print a hexdump of the given block void hexdump(const void * const ptr, const size_t len) { const uint8_t * const buf = ptr; for (uint8_t i = 0; i < len; i += 16) { fprintf(stderr, "%06x: ", i); for (uint8_t j = 0; j < 16; j++) { if (i + j < len) fprintf(stderr, "%02hhx ", buf[i + j]); else fprintf(stderr, " "); fprintf(stderr, " "); } for (uint8_t j = 0; j < 16; j++) { if (i + j < len) fprintf(stderr, "%c", isprint(buf[i + j]) ? buf[i + j] : '.'); } fprintf(stderr, "\n"); } } #endif
#include <ctype.h> #include <stdio.h> #include "debug.h" #ifndef NDEBUG const char * const col[] = {MAG, RED, YEL, CYN, BLU, GRN}; regex_t _comp; // Initialize the regular expression used for restricting debug output static void __attribute__((constructor)) premain() { if (regcomp(&_comp, DCOMPONENT, REG_EXTENDED | REG_ICASE | REG_NOSUB)) die("may not be a valid regexp: %s", DCOMPONENT); } // And free is again static void __attribute__((destructor)) postmain() { regfree(&_comp); } // Print a hexdump of the given block void hexdump(const void * const ptr, const size_t len) { const uint8_t * const buf = ptr; for (size_t i = 0; i < len; i += 16) { fprintf(stderr, "%06lx: ", i); for (size_t j = 0; j < 16; j++) { if (i + j < len) fprintf(stderr, "%02hhx ", buf[i + j]); else fprintf(stderr, " "); fprintf(stderr, " "); } for (size_t j = 0; j < 16; j++) { if (i + j < len) fprintf(stderr, "%c", isprint(buf[i + j]) ? buf[i + j] : '.'); } fprintf(stderr, "\n"); } } #endif
Fix overflow bug introduced in f6b3328f
Fix overflow bug introduced in f6b3328f
C
bsd-2-clause
NTAP/quant,NTAP/quant,NTAP/quant
87dd7d92b3a2598eef4afdde3cda46e1fc23b6e8
test/CodeGen/2003-10-29-AsmRename.c
test/CodeGen/2003-10-29-AsmRename.c
// RUN: %clang_cc1 -emit-llvm %s -o /dev/null struct foo { int X; }; struct bar { int Y; }; extern int Func(struct foo*) __asm__("Func64"); extern int Func64(struct bar*); int Func(struct foo *F) { return 1; } int Func64(struct bar* B) { return 0; } int test() { Func(0); /* should be renamed to call Func64 */ Func64(0); }
// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-apple-darwin -o /dev/null struct foo { int X; }; struct bar { int Y; }; extern int Func(struct foo*) __asm__("Func64"); extern int Func64(struct bar*); int Func(struct foo *F) { return 1; } int Func64(struct bar* B) { return 0; } int test() { Func(0); /* should be renamed to call Func64 */ Func64(0); }
Make this darwin only for now while investigating to clear up x86_64 Release+Asserts linux tests.
Make this darwin only for now while investigating to clear up x86_64 Release+Asserts linux tests. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136223 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
33701a61674753db0c9de7a294137e7dc4dd2d9b
test/Parser/traditional_arg_scope.c
test/Parser/traditional_arg_scope.c
// RUN: clang -fsyntax-only %s -verify x(a) int a; {return a;} y(b) int b; {return a;} // expected-error {{use of undeclared identifier}}
// RUN: clang -fsyntax-only %s -verify x(a) int a; {return a;} y(b) int b; {return a;} // expected-error {{use of undeclared identifier}} // PR2332 a(a)int a;{a=10;return a;}
Test from PR2332; bug already fixed by r51311.
Test from PR2332; bug already fixed by r51311. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@51316 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,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,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
93b6ed1dc37e1809b7a9dfa04171c34b7b6153ca
src/SE_GLFW3_Include.h
src/SE_GLFW3_Include.h
#pragma once #define GLFW_INCLUDE_GLU #if __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdocumentation" #endif #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpadded" # include <GLFW/glfw3.h> #pragma GCC diagnostic pop #if __clang__ #pragma clang diagnostic pop #endif
#pragma once #define GLFW_INCLUDE_GLU #if __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdocumentation" #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" #endif #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpadded" # include <GLFW/glfw3.h> #pragma GCC diagnostic pop #if __clang__ #pragma clang diagnostic pop #endif
Disable another warning in GLFW.
Disable another warning in GLFW.
C
agpl-3.0
belkiss/SpeakEasy,belkiss/SpeakEasy
2e2d5d779fa18c98d6affc025dc5fcb122743f4c
test/Sema/2007-10-01-BuildArrayRef.c
test/Sema/2007-10-01-BuildArrayRef.c
// RUN: not %clang_cc1_only -c %s -o - > /dev/null // PR 1603 void func() { const int *arr; arr[0] = 1; // expected-error {{assignment of read-only location}} } struct foo { int bar; }; struct foo sfoo = { 0 }; int func2() { const struct foo *fp; fp = &sfoo; fp[0].bar = 1; // expected-error {{ assignment of read-only member}} return sfoo.bar; }
// RUN: %clang_cc1 -fsyntax-only -verify %s // PR 1603 void func() { const int *arr; arr[0] = 1; // expected-error {{read-only variable is not assignable}} } struct foo { int bar; }; struct foo sfoo = { 0 }; int func2() { const struct foo *fp; fp = &sfoo; fp[0].bar = 1; // expected-error {{read-only variable is not assignable}} return sfoo.bar; }
Fix a test that hasn't worked since 2007
Fix a test that hasn't worked since 2007 Due to a missing -verify, 2007-10-01-BuildArrayRef.c was a no-op. The message was changed 5 years ago so also update the test to reflect the new wording. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@196729 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
05461a9fc72c303f611d0b37cde545c2b0c7bdc2
PolyMapGenerator/Map.h
PolyMapGenerator/Map.h
#ifndef MAP_H #define MAP_H #include <vector> #include <map> #include "DelaunayTriangulation.h" #include "Structure.h" #include "QuadTree.h" #endif
#ifndef MAP_H #define MAP_H #include <vector> #include <map> #include "DelaunayTriangulation.h" #include "Structure.h" #include "QuadTree.h" using pCenterQT = QuadTree<Center*>; // Forward Declaration class Vector2; namespace Noise { namespace Module { class Perlin; } } #endif
Define alias type, forward declaration
Define alias type, forward declaration
C
mit
utilForever/PolyMapGenerator
d2bf3b4d67fba2849f0d648c491fd2a4f808ce95
Code/LYRUIMediaAttachment.h
Code/LYRUIMediaAttachment.h
// // LYRUIMediaAttachment.h // LayerSample // // Created by Kevin Coleman on 9/12/14. // Copyright (c) 2014 Layer, Inc. All rights reserved. // #import <UIKit/UIKit.h> /** @abstract The `LYRUIMediaAttachment` class configures the appropriate size for an NSTextAttachment to comfortably fit inside of a LYRUIMessageInputToolbar */ @interface LYRUIMediaAttachment : NSTextAttachment @end
// // LYRUIMediaAttachment.h // LayerSample // // Created by Kevin Coleman on 9/12/14. // Copyright (c) 2014 Layer, Inc. All rights reserved. // #import <UIKit/UIKit.h> /** @abstract The `LYRUIMediaAttachment` class configures the appropriate size for an NSTextAttachment to comfortably fit inside of a `LYRUIMessageInputToolbar`. */ @interface LYRUIMediaAttachment : NSTextAttachment @end
Add missing backticks and period in media attachment header comment.
Add missing backticks and period in media attachment header comment.
C
apache-2.0
InterfaceInc/Atlas-iOS,drborges/Atlas-iOS,allensoberano/Atlas-iOS,fhchina/Atlas-iOS,AlexanderMazaletskiy/Atlas-iOS,hellosimplify/Atlas-iOS,joshleibsly/Atlas-iOS,grevolution/Atlas-iOS,acarella/Atlas-iOS,classic-chris/Atlas-iOS,Bluefieldscom/Atlas-iOS,xuzhenguo/Atlas-iOS,dvan001/Atlas-iOS,msdgwzhy6/Atlas-iOS,mohsinalimat/Atlas-iOS,mailyan/Atlas-iOS,NghiaTranUIT/Atlas-iOS,danielwmsun/Atlas-iOS,Suninus/Atlas-iOS,ntnmrndn/Atlas-iOS,fishermenlabs/Atlas-iOS,bandlab/Atlas-iOS,dfinzer/Atlas-iOS,misberri/Atlas-iOS,jflinter/Atlas-iOS,daninfpj/Atlas-iOS,sujohn/Atlas-iOS,jeff-riffsy/Atlas-iOS,sunfei/Atlas-iOS,sanvean/Atlas-iOS,keyeMyria/Atlas-iOS,shaohung001/Atlas-iOS,Eynaliyev/Atlas-iOS,jianwoo/Atlas-iOS,sidewire/Atlas-iOS,ccrazy88/Atlas-iOS,leopardpan/Atlas-iOS,nKey/Atlas-iOS,charlespsdowd/Atlas-iOS,linearregression/Atlas-iOS,venturehacks/Atlas-iOS,bright/Atlas-iOS,BearchInc/Atlas-iOS,Cambly/Atlas-iOS,geoffmacd/Atlas-iOS,andrewcopp/Atlas-iOS,r0ct0-tecsynt/Atlas-iOS,jaderfeijo/Atlas-iOS
648778df9610e63104914c7fd9a59a07c3016fe4
BraintreeCore/BTAPIClient_Internal.h
BraintreeCore/BTAPIClient_Internal.h
#import "BTAnalyticsService.h" #import "BTAPIClient.h" #import "BTClientMetadata.h" #import "BTClientToken.h" #import "BTHTTP.h" #import "BTJSON.h" NS_ASSUME_NONNULL_BEGIN @class BTPaymentMethodNonce; @interface BTAPIClient () @property (nonatomic, copy, nullable) NSString *tokenizationKey; @property (nonatomic, strong, nullable) BTClientToken *clientToken; @property (nonatomic, strong) BTHTTP *http; @property (nonatomic, strong) BTHTTP *configurationHTTP; /*! @brief Client metadata that is used for tracking the client session */ @property (nonatomic, readonly, strong) BTClientMetadata *metadata; /*! @brief Exposed for testing analytics */ @property (nonatomic, strong) BTAnalyticsService *analyticsService; /*! @brief Sends this event and all queued analytics events. Used by internal clients. */ - (void)sendAnalyticsEvent:(NSString *)eventName; /*! @brief Queues an analytics event to be sent. */ - (void)queueAnalyticsEvent:(NSString *)eventName; /*! @brief An internal initializer to toggle whether to send an analytics event during initialization. @discussion This prevents copyWithSource:integration: from sending a duplicate event. It can also be used to suppress excessive network chatter during testing. */ - (nullable instancetype)initWithAuthorization:(NSString *)authorization sendAnalyticsEvent:(BOOL)sendAnalyticsEvent; @end NS_ASSUME_NONNULL_END
#import "BTAnalyticsService.h" #import "BTAPIClient.h" #import "BTClientMetadata.h" #import "BTClientToken.h" #import "BTHTTP.h" #import "BTJSON.h" NS_ASSUME_NONNULL_BEGIN @class BTPaymentMethodNonce; @interface BTAPIClient () @property (nonatomic, copy, nullable) NSString *tokenizationKey; @property (nonatomic, strong, nullable) BTClientToken *clientToken; @property (nonatomic, strong) BTHTTP *http; @property (nonatomic, strong) BTHTTP *configurationHTTP; /*! @brief Client metadata that is used for tracking the client session */ @property (nonatomic, readonly, strong) BTClientMetadata *metadata; /*! @brief Exposed for testing analytics */ @property (nonatomic, strong) BTAnalyticsService *analyticsService; /*! @brief Sends this event and all queued analytics events. Use `queueAnalyticsEvent` for low priority events. */ - (void)sendAnalyticsEvent:(NSString *)eventName; /*! @brief Queues an analytics event to be sent. */ - (void)queueAnalyticsEvent:(NSString *)eventName; /*! @brief An internal initializer to toggle whether to send an analytics event during initialization. @discussion This prevents copyWithSource:integration: from sending a duplicate event. It can also be used to suppress excessive network chatter during testing. */ - (nullable instancetype)initWithAuthorization:(NSString *)authorization sendAnalyticsEvent:(BOOL)sendAnalyticsEvent; @end NS_ASSUME_NONNULL_END
Update header documentation for BTAPIClient-Internal
Update header documentation for BTAPIClient-Internal
C
mit
braintree/braintree_ios,apascual/braintree_ios,billCTG/braintree_ios,apascual/braintree_ios,braintree/braintree_ios,billCTG/braintree_ios,billCTG/braintree_ios,billCTG/braintree_ios,braintree/braintree_ios,apascual/braintree_ios,apascual/braintree_ios,braintree/braintree_ios,billCTG/braintree_ios
1bd3551a0fbd8bc375a9bb7a60d8152ff641f3f9
tests/regression/36-apron/01-octagon_simple.c
tests/regression/36-apron/01-octagon_simple.c
// SKIP PARAM: --set solver td3 --enable ana.int.interval --set ana.base.arrays.domain partitioned --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy // Example from https://www-apr.lip6.fr/~mine/publi/article-mine-HOSC06.pdf void main(void) { int X = 0; int N = rand(); if(N < 0) { N = 0; } while(X < N) { X++; } assert(X-N == 0); assert(X == N); if(X == N) { N = 8; } else { // is dead code but if that is detected or not depends on what we do in branch // currently we can't detect this N = 42; } }
// SKIP PARAM: --set solver td3 --enable ana.int.interval --set ana.base.arrays.domain partitioned --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy // Example from https://www-apr.lip6.fr/~mine/publi/article-mine-HOSC06.pdf void main(void) { int X = 0; int N = rand(); if(N < 0) { N = 0; } while(X < N) { X++; } assert(X-N == 0); assert(X == N); if(X == N) { N = 8; } else { // dead code N = 42; } assert(N == 8); }
Make assert in 36/01 stronger
Make assert in 36/01 stronger
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
d922310020e7b97741a5f7e45e84c9ff840514fc
Code/CDAUtilities.h
Code/CDAUtilities.h
// // CDAUtilities.h // ContentfulSDK // // Created by Boris Bügling on 04/03/14. // // #import <ContentfulDeliveryAPI/CDAClient.h> #import <Foundation/Foundation.h> NSString* CDACacheFileNameForQuery(CDAClient* client, CDAResourceType resourceType, NSDictionary* query); NSString* CDACacheFileNameForResource(CDAResource* resource); NSArray* CDAClassGetSubclasses(Class parentClass); void CDADecodeObjectWithCoder(id object, NSCoder* aDecoder); void CDAEncodeObjectWithCoder(id object, NSCoder* aCoder); BOOL CDAIsNoNetworkError(NSError* error);
// // CDAUtilities.h // ContentfulSDK // // Created by Boris Bügling on 04/03/14. // // #import <ContentfulDeliveryAPI/CDAClient.h> #import <Foundation/Foundation.h> NSString* CDACacheDirectory(); NSString* CDACacheFileNameForQuery(CDAClient* client, CDAResourceType resourceType, NSDictionary* query); NSString* CDACacheFileNameForResource(CDAResource* resource); NSArray* CDAClassGetSubclasses(Class parentClass); void CDADecodeObjectWithCoder(id object, NSCoder* aDecoder); void CDAEncodeObjectWithCoder(id object, NSCoder* aCoder); BOOL CDAIsNoNetworkError(NSError* error);
Make the cache directory accessor public.
Make the cache directory accessor public.
C
mit
contentful/contentful.objc,contentful/contentful.objc,davidmdavis/contentful.objc,davidmdavis/contentful.objc,akfreas/contentful.objc,contentful/contentful.objc,danieleggert/contentful.objc,danieleggert/contentful.objc,akfreas/contentful.objc,danieleggert/contentful.objc,akfreas/contentful.objc,davidmdavis/contentful.objc
6fac7a106ada5c1428a629d9ef418f0482c01001
PHYKit/PHYKit/PHYGeometry.h
PHYKit/PHYKit/PHYGeometry.h
// // PHYGeometry.h // PHYKit // // Created by Nora Trapp on 8/1/13. // Copyright (c) 2013 Nora Trapp. All rights reserved. // #import <Box2D/Common/b2Math.h> #define kPointsToMeterRatio (32) #define PointsToMeters(points) (points / kPointsToMeterRatio) #define MetersToPoints(meters) (meters * kPointsToMeterRatio) #define CGPointTob2Vec2(point) (b2Vec2(PointsToMeters(point.x), PointsToMeters(point.y))) #define b2Vec2ToCGPoint(vector) (CGPointMake(MetersToPoints(vector.x), MetersToPoints(vector.y)))
// // PHYGeometry.h // PHYKit // // Created by Nora Trapp on 8/1/13. // Copyright (c) 2013 Nora Trapp. All rights reserved. // #import <Box2D/Common/b2Math.h> #define kPointsToMeterRatio (32.0) #define PointsToMeters(points) (points / kPointsToMeterRatio) #define MetersToPoints(meters) (meters * kPointsToMeterRatio) #define CGPointTob2Vec2(point) (b2Vec2(PointsToMeters(point.x), PointsToMeters(point.y))) #define b2Vec2ToCGPoint(vector) (CGPointMake(MetersToPoints(vector.x), MetersToPoints(vector.y)))
Change PointsToMeters ratio to a float, so we doing floating point math
Change PointsToMeters ratio to a float, so we doing floating point math
C
mit
Imperiopolis/PHYKit
a5f1eb8cfa251cd56957cdbc434322f1a5406ee2
src/math/double/log.c
src/math/double/log.c
#include "kernel/log.h" #include "normalize.h" #include "../reinterpret.h" #include <math.h> static double _finite(int64_t i) { const double ln2[] = { 0x1.62e42fefa4p-1, -0x1.8432a1b0e2634p-43 }; int64_t exponent = (i - 0x3FE6A09E667F3BCD) >> 52; double x = reinterpret(double, i - (exponent << 52)) - 1; double z = x / (x + 2); double h = 0.5 * x * x; return z * (h + _kernel_log(z)) + exponent * ln2[1] - h + x + exponent * ln2[0]; } double log(double x) { int64_t i = reinterpret(int64_t, x); if (i <= 0) return i << 1 == 0 ? -INFINITY : NAN; if (i < 0x7FF0000000000000) return _finite(_normalize(i)); return x; }
#include "kernel/log.h" #include "normalize.h" #include "../reinterpret.h" #include <math.h> static double _finite(int64_t i) { const double ln2[] = { 0x1.62e42fefa4p-1, -0x1.8432a1b0e2634p-43 }; int64_t exponent = (i - 0x3FE6A09E667F3BCD) >> 52; double x = reinterpret(double, i - (exponent << 52)) - 1; double z = x / (x + 2); double h = 0.5 * x * x; return exponent * ln2[1] + z * (h + _kernel_log(z)) - h + x + exponent * ln2[0]; } double log(double x) { int64_t i = reinterpret(int64_t, x); if (i <= 0) return i << 1 == 0 ? -INFINITY : NAN; if (i < 0x7FF0000000000000) return _finite(_normalize(i)); return x; }
Reorder terms by expected size, though this does not affect calculation
Reorder terms by expected size, though this does not affect calculation
C
mit
jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic
903787a5941c9eabcbfe597ee4d80843dc9c586f
src/modules/conf_randr/e_smart_monitor.h
src/modules/conf_randr/e_smart_monitor.h
#ifdef E_TYPEDEFS #else # ifndef E_SMART_MONITOR_H # define E_SMART_MONITOR_H Evas_Object *e_smart_monitor_add(Evas *evas); void e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch); void e_smart_monitor_output_set(Evas_Object *obj, Ecore_X_Randr_Output output); void e_smart_monitor_grid_set(Evas_Object *obj, Evas_Object *grid); void e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy); # endif #endif
#ifdef E_TYPEDEFS #else # ifndef E_SMART_MONITOR_H # define E_SMART_MONITOR_H Evas_Object *e_smart_monitor_add(Evas *evas); void e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch); void e_smart_monitor_output_set(Evas_Object *obj, Ecore_X_Randr_Output output); void e_smart_monitor_grid_set(Evas_Object *obj, Evas_Object *grid, Evas_Coord gx, Evas_Coord gy, Evas_Coord gw, Evas_Coord gh); void e_smart_monitor_virtual_size_set(Evas_Object *obj, Evas_Coord vw, Evas_Coord vh); void e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy); # endif #endif
Change monitor_grid_set function to also accept the grid geometry (used for virtual-->canvas coordinate functions).
Change monitor_grid_set function to also accept the grid geometry (used for virtual-->canvas coordinate functions). Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 84169
C
bsd-2-clause
tasn/enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,rvandegrift/e,rvandegrift/e,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment
e65030e7639fd0e21789ed18855b36720cdba09d
samples/fx_lpng/include/fx_png.h
samples/fx_lpng/include/fx_png.h
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../lpng_v163/png.h"
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../lpng_v163/png.h"
Convert all files on the master branch to unix line endings.
Convert all files on the master branch to unix line endings. Luckily, it's just one file. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1281923004 .
C
bsd-3-clause
was4444/pdfium,DrAlexx/pdfium,azunite/libpdfium,andoma/pdfium,andoma/pdfium,was4444/pdfium,DrAlexx/pdfium,azunite/libpdfium,was4444/pdfium,DrAlexx/pdfium,was4444/pdfium,andoma/pdfium,andoma/pdfium,azunite/libpdfium,DrAlexx/pdfium,azunite/libpdfium
7d2c8d0aed20b6d2b02c7bd79aed173664742a6e
src/condor_ckpt/condor_syscalls.h
src/condor_ckpt/condor_syscalls.h
#ifndef _CONDOR_SYSCALLS_H #define _CONDOR_SYSCALLS_H #if defined( AIX32) # include "syscall.aix32.h" #else # include <syscall.h> #endif typedef int BOOL; static const int SYS_LOCAL = 1; static const int SYS_REMOTE = 0; static const int SYS_RECORDED = 2; static const int SYS_MAPPED = 2; static const int SYS_UNRECORDED = 0; static const int SYS_UNMAPPED = 0; #if defined(__cplusplus) extern "C" { #endif int SetSyscalls( int mode ); int GetSyscallMode(); BOOL LocalSysCalls(); BOOL RemoteSysCalls(); BOOL MappingFileDescriptors(); int REMOTE_syscall( int syscall_num, ... ); #if defined(OSF1) || defined(HPUX9) int syscall( int, ... ); #endif #if defined(__cplusplus) } #endif #endif
#ifndef _CONDOR_SYSCALLS_H #define _CONDOR_SYSCALLS_H #if defined( AIX32) # include "syscall.aix32.h" #else # include <syscall.h> #endif typedef int BOOL; static const int SYS_LOCAL = 1; static const int SYS_REMOTE = 0; static const int SYS_RECORDED = 2; static const int SYS_MAPPED = 2; static const int SYS_UNRECORDED = 0; static const int SYS_UNMAPPED = 0; #if defined(__cplusplus) extern "C" { #endif int SetSyscalls( int mode ); int GetSyscallMode(); BOOL LocalSysCalls(); BOOL RemoteSysCalls(); BOOL MappingFileDescriptors(); int REMOTE_syscall( int syscall_num, ... ); #if defined(OSF1) || defined(HPUX9) || defined(SUNOS41) int syscall( int, ... ); #endif #if defined(__cplusplus) } #endif #endif
Add SUNOS41 to an existing conditional compilation directive.
Add SUNOS41 to an existing conditional compilation directive.
C
apache-2.0
mambelli/osg-bosco-marco,zhangzhehust/htcondor,clalancette/condor-dcloud,htcondor/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,clalancette/condor-dcloud,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,zhangzhehust/htcondor,clalancette/condor-dcloud,djw8605/htcondor,neurodebian/htcondor,htcondor/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/condor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,htcondor/htcondor,neurodebian/htcondor,djw8605/htcondor,clalancette/condor-dcloud,djw8605/condor,zhangzhehust/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,djw8605/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,djw8605/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,neurodebian/htcondor,neurodebian/htcondor,djw8605/condor,djw8605/condor,htcondor/htcondor,djw8605/condor,zhangzhehust/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,djw8605/condor,clalancette/condor-dcloud,djw8605/htcondor,djw8605/condor,djw8605/htcondor,neurodebian/htcondor,neurodebian/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco
295b8c8f866469181703c4c2e882dc6af955e9c7
K2Status-static-ImportExport/include/k2info.h
K2Status-static-ImportExport/include/k2info.h
#include "k2pktdef.h" #define TRACE2_STA_LEN 7 #define TRACE2_CHAN_LEN 9 /* 4 bytes plus padding for loc and version */ #define TRACE2_NET_LEN 9 #define TRACE2_LOC_LEN 3 #define K2INFO_TYPE_STRING "TYPE_K2INFO_PACKET" typedef struct { char net[TRACE2_NET_LEN]; /* Network name */ char sta[TRACE2_STA_LEN]; /* Site name */ qint16 data_type; /* see K2INFO_TYPE #defines below */ quint32 epoch_sent; /* local time sent */ quint16 reserved[5]; /* reserved for future use */ } K2INFO_HEADER; #define K2INFO_TYPE_HEADER 1 /* k2 header params */ #define K2INFO_TYPE_STATUS 2 /* k2 regular status packet */ #define K2INFO_TYPE_ESTATUS 3 /* k2 extended status packet (old) */ #define K2INFO_TYPE_E2STATUS 4 /* k2 extended status packet v2 */ #define K2INFO_TYPE_COMM 5 /* k2ew packet processing stats */ #define MAX_K2INFOBUF_SIZ 4096 typedef union { qint8 msg[MAX_K2INFOBUF_SIZ]; K2INFO_HEADER k2info; } K2infoPacket;
#include "k2pktdef.h" #define TRACE2_STA_LEN 7 #define TRACE2_CHAN_LEN 9 /* 4 bytes plus padding for loc and version */ #define TRACE2_NET_LEN 9 #define TRACE2_LOC_LEN 3 #define K2_TIME_CONV ((unsigned long)315532800) #define K2INFO_TYPE_STRING "TYPE_K2INFO_PACKET" typedef struct { char net[TRACE2_NET_LEN]; /* Network name */ char sta[TRACE2_STA_LEN]; /* Site name */ qint16 data_type; /* see K2INFO_TYPE #defines below */ quint32 epoch_sent; /* local time sent */ quint16 reserved[5]; /* reserved for future use */ } K2INFO_HEADER; #define K2INFO_TYPE_HEADER 1 /* k2 header params */ #define K2INFO_TYPE_STATUS 2 /* k2 regular status packet */ #define K2INFO_TYPE_ESTATUS 3 /* k2 extended status packet (old) */ #define K2INFO_TYPE_E2STATUS 4 /* k2 extended status packet v2 */ #define K2INFO_TYPE_COMM 5 /* k2ew packet processing stats */ #define MAX_K2INFOBUF_SIZ 4096 typedef union { qint8 msg[MAX_K2INFOBUF_SIZ]; K2INFO_HEADER k2info; } K2infoPacket;
Make 64Bit Friendly, NonStatic for Ubuntu 14.04 delete unneeded files
Make 64Bit Friendly, NonStatic for Ubuntu 14.04 delete unneeded files
C
lgpl-2.1
Fran89/K2Status,Fran89/K2Status
ec3bd3aa0c6b507e8819d58ac5282b7f97f0be28
libslax/slaxprofiler.h
libslax/slaxprofiler.h
/* * $Id$ * * Copyright (c) 2010-2011, Juniper Networks, Inc. * All rights reserved. * This SOFTWARE is licensed under the LICENSE provided in the * ../Copyright file. By downloading, installing, copying, or otherwise * using the SOFTWARE, you agree to be bound by the terms of that * LICENSE. */ /** * Called from the debugger when we want to profile a script. * * @docp document pointer for the script * @returns TRUE is there was a problem */ int slaxProfOpen (xmlDocPtr docp); /** * Called when we enter a instruction. * * @docp document pointer * @inst instruction (slax/xslt code) pointer */ void slaxProfEnter (xmlNodePtr inst); /** * Called when we exit an instruction */ void slaxProfExit (void); #if 0 typedef int (*slaxProfCallback_t)(void *, const char *fmt, ...); #endif /** * Report the results */ void slaxProfReport (int); /** * Clear all values */ void slaxProfClear (void); /** * Done (free resources) */ void slaxProfClose (void);
/* * Copyright (c) 2010-201e, Juniper Networks, Inc. * All rights reserved. * This SOFTWARE is licensed under the LICENSE provided in the * ../Copyright file. By downloading, installing, copying, or otherwise * using the SOFTWARE, you agree to be bound by the terms of that * LICENSE. */ /** * Called from the debugger when we want to profile a script. * * @docp document pointer for the script * @returns TRUE is there was a problem */ int slaxProfOpen (xmlDocPtr docp); /** * Called when we enter a instruction. * * @docp document pointer * @inst instruction (slax/xslt code) pointer */ void slaxProfEnter (xmlNodePtr inst); /** * Called when we exit an instruction */ void slaxProfExit (void); #if 0 typedef int (*slaxProfCallback_t)(void *, const char *fmt, ...); #endif /** * Report the results */ void slaxProfReport (int); /** * Clear all values */ void slaxProfClear (void); /** * Done (free resources) */ void slaxProfClose (void);
Drop $Id$ and update copyright
Drop $Id$ and update copyright
C
bsd-3-clause
Juniper/libslax,Juniper/libslax,Juniper/libslax
5fd3d4cdd83c079b2f588380622b2b3348a67360
src/IDPDataKit.h
src/IDPDataKit.h
#import "IDPBlock.h" #import "IDPBufferArray.h" #import "IDPKVOContext.h" #import "IDPKVOMutableArray.h" #import "IDPKeyPathObserver.h" #import "IDPMachTimer.h" #import "IDPMutableArray.h" #import "IDPMutableDictionary.h" #import "IDPOCContext.h" #import "IDPOCImplementation.h" #import "IDPOCStack.h" #import "NSObject+IDPOCExtensionsPrivate.h" #import "IDPReference.h" #import "IDPRetainingReference.h" #import "IDPWeakReference.h" #import "IDPRetainingDictionary.h" #import "IDPStackArray.h" #import "IDPURLConnection.h" #import "IDPURLRequest.h" #import "IDPWeakArray.h"
#import "IDPBlock.h" #import "IDPBufferArray.h" #import "IDPKVOContext.h" #import "IDPKVOMutableArray.h" #import "IDPKeyPathObserver.h" #import "IDPMachTimer.h" #import "IDPMutableArray.h" #import "IDPMutableDictionary.h" #import "IDPOCContext.h" #import "IDPOCImplementation.h" #import "IDPOCStack.h" #import "NSObject+IDPOCExtensionsPrivate.h" #import "IDPReference.h" #import "IDPRetainingReference.h" #import "IDPWeakReference.h" #import "IDPRetainingDictionary.h" #import "IDPStackArray.h" #import "IDPURLConnection.h" #import "IDPURLRequest.h" #import "IDPWeakArray.h" #import "IDPSingletonModel.h"
Add to header file IDPSingletonModel.
Add to header file IDPSingletonModel.
C
bsd-3-clause
idapgroup/DataKit,idapgroup/DataKit,idapgroup/DataKit,idapgroup/DataKit
67ce2b4d5e93bea3bbbb28f711f0de09228f9de9
src/unique_ptr.h
src/unique_ptr.h
// Copyright 2014 The open-vcdiff Authors. All Rights Reserved. // Author: Mostyn Bramley-Moore // // 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 OPEN_VCDIFF_UNIQUE_PTR_H_ #define OPEN_VCDIFF_UNIQUE_PTR_H_ // std::auto_ptr is deprecated in C++11, in favor of std::unique_ptr. // Since C++11 is not widely available yet, the macro below is used to // select the best available option. #include <memory> #if __cplusplus >= 201103L // C++11 #define UNIQUE_PTR std::unique_ptr #else #define UNIQUE_PTR std::auto_ptr #endif #endif // OPEN_VCDIFF_UNIQUE_PTR_H_
// Copyright 2014 The open-vcdiff Authors. All Rights Reserved. // Author: Mostyn Bramley-Moore // // 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 OPEN_VCDIFF_UNIQUE_PTR_H_ #define OPEN_VCDIFF_UNIQUE_PTR_H_ // std::auto_ptr is deprecated in C++11, in favor of std::unique_ptr. // Since C++11 is not widely available yet, the macro below is used to // select the best available option. #include <memory> #if __cplusplus >= 201103L && !defined(OPEN_VCDIFF_USE_AUTO_PTR) // C++11 #define UNIQUE_PTR std::unique_ptr #else #define UNIQUE_PTR std::auto_ptr #endif // __cplusplus >= 201103L && !defined(OPEN_VCDIFF_USE_AUTO_PTR) #endif // OPEN_VCDIFF_UNIQUE_PTR_H_
Add an option to force use of auto_ptr for legacy STL implementations.
Add an option to force use of auto_ptr for legacy STL implementations.
C
apache-2.0
Steelskin/open-vcdiff,elly/open-vcdiff,Steelskin/open-vcdiff,google/open-vcdiff,elly/open-vcdiff,google/open-vcdiff,elly/open-vcdiff,google/open-vcdiff,Steelskin/open-vcdiff
ffbd18870f6fa2284884e6c425e51f00efe48cc2
src/util/files.c
src/util/files.c
// // Created by gravypod on 9/20/17. // #include "files.h" #include <sys/stat.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> long int fsize(const char *filename) { struct stat st; if (stat(filename, &st) == 0) return st.st_size; return -1; } char* read_file(const char* filename) { const size_t file_size = (size_t) fsize(filename); FILE *f; if (file_size == -1 || !(f = fopen(filename, "rb"))) { return NULL; } size_t data_left = file_size; char *buffer = malloc(file_size + 1); char *tmp = buffer; while (data_left > 0) { const size_t len = fread((void *) tmp, sizeof(char), sizeof(buffer), f); data_left -= len; tmp += len; } buffer[file_size] = 0; fclose(f); return buffer; }
// // Created by gravypod on 9/20/17. // #include "files.h" #include <sys/stat.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> long int fsize(const char *filename) { struct stat st; if (stat(filename, &st) == 0) return st.st_size; return -1; } char* read_file(const char* filename) { long int reported_size = fsize(filename); FILE *f; if (reported_size == -1 || !(f = fopen(filename, "rb"))) { return NULL; } const size_t file_size = (size_t) reported_size; size_t data_left = file_size; char *buffer = malloc(file_size + 1); char *tmp = buffer; while (data_left > 0) { const size_t len = fread((void *) tmp, sizeof(char), sizeof(buffer), f); data_left -= len; tmp += len; } buffer[file_size] = 0; fclose(f); return buffer; }
Make sure file stat actually finished. Don't check a size_t for neg.
Make sure file stat actually finished. Don't check a size_t for neg.
C
mit
gravypod/solid-snake,gravypod/solid-snake,gravypod/solid-snake
681cc70a6305451ea1c85dbd239ea3cd38abe7b3
simulator/ghc_instruction.h
simulator/ghc_instruction.h
#include <vector> enum GHCMnemonic { MOV, INC, DEC, ADD, SUB, MUL, DIV, AND, OR, XOR, JLT, JEQ, JGT, INT, HLT }; enum GHCRegister { A = 0, B, C, D, E, F, G, H, PC }; enum GHCArgumentType { Constant, Register, Memory }; struct GHCArgument { GHCArgumentType type; unsigned int id; }; struct GHCInstruction { GHCMnemonic mnemonic; std::vector<GHCArgument> arguments; };
#include <vector> enum GHCMnemonic { MOV, INC, DEC, ADD, SUB, MUL, DIV, AND, OR, XOR, JLT, JEQ, JGT, INT, HLT }; enum GHCRegister { A = 0, B, C, D, E, F, G, H, PC }; enum GHCArgumentType { Constant, Register, Memory }; struct GHCArgument { GHCArgumentType type; bool as_address; unsigned int id; }; struct GHCInstruction { GHCMnemonic mnemonic; std::vector<GHCArgument> arguments; };
Add as_address on mnemonic argument.
Add as_address on mnemonic argument.
C
mit
fuqinho/icfpc2014,fuqinho/icfpc2014
b8c623d9a4331c20dd28220868bdc6d98b2bd4c4
examples/parsebuf.c
examples/parsebuf.c
/* Very simple example for parse buf example */ #include <string.h> #include <stdlib.h> #include "confuse.h" int main(void) { cfg_t *cfg; cfg_opt_t arg_opts[] = { CFG_STR("value", "default", CFGF_NONE), CFG_END() }; cfg_opt_t opts[] = { CFG_INT("delay", 3, CFGF_NONE), CFG_STR("message", "This is a message", CFGF_NONE), CFG_SEC("argument", arg_opts, CFGF_MULTI | CFGF_TITLE), CFG_END() }; char *buf = " delay = 3\n" "# message = 'asdfasfasfd tersf'\n" " argument one { value = bar }\n" " argument two { value=foo}\n"; cfg = cfg_init(opts, 0); if (cfg_parse_buf(cfg, buf) != CFG_SUCCESS) { fprintf(stderr, "Failed parsing configuration: %s\n", strerror(errno)); exit(1); } cfg_print(cfg, stdout); return cfg_free(cfg); }
/* Very simple example for parse buf example */ #include <errno.h> #include <string.h> #include <stdlib.h> #include "confuse.h" int main(void) { cfg_t *cfg; cfg_opt_t arg_opts[] = { CFG_STR("value", "default", CFGF_NONE), CFG_END() }; cfg_opt_t opts[] = { CFG_INT("delay", 3, CFGF_NONE), CFG_STR("message", "This is a message", CFGF_NONE), CFG_SEC("argument", arg_opts, CFGF_MULTI | CFGF_TITLE), CFG_END() }; char *buf = " delay = 3\n" "# message = 'asdfasfasfd tersf'\n" " argument one { value = bar }\n" " argument two { value=foo}\n"; cfg = cfg_init(opts, 0); if (cfg_parse_buf(cfg, buf) != CFG_SUCCESS) { fprintf(stderr, "Failed parsing configuration: %s\n", strerror(errno)); exit(1); } cfg_print(cfg, stdout); return cfg_free(cfg); }
Add missing errno.h include for Linux/UNIX
Add missing errno.h include for Linux/UNIX Signed-off-by: Joachim Nilsson <583c295fd7602c168ad814279bbc3894ba65f5d6@gmail.com>
C
isc
troglobit/libconfuse,westermo/libconfuse,peda-r/libconfuse,martinh/libconfuse,peda-r/libconfuse,troglobit/libconfuse,westermo/libconfuse,martinh/libconfuse
8323670661ff47298967bca382b360f50f878041
native-unpacker/kisskiss.h
native-unpacker/kisskiss.h
/* * kisskiss.h * * Tim "diff" Strazzere <strazz@gmail.com> */ #include <stdlib.h> #include <stdio.h> #include <sys/ptrace.h> #include <dirent.h> #include <fcntl.h> // open / O_RDONLY static const char* odex_magic = "dey\n036"; static const char* static_safe_location = "/data/local/tmp/"; static const char* suffix = ".dumped_odex"; typedef struct { uint32_t start; uint32_t end; } memory_region; uint32_t get_clone_pid(uint32_t service_pid); uint32_t get_process_pid(const char* target_package_name); char *determine_filter(uint32_t clone_pid, int memory_fd); int find_magic_memory(uint32_t clone_pid, int memory_fd, memory_region *memory, char* extra_filter); int peek_memory(int memory_file, uint32_t address); int dump_memory(int memory_fd, memory_region *memory, const char* file_name); int attach_get_memory(uint32_t pid);
/* * kisskiss.h * * Tim "diff" Strazzere <strazz@gmail.com> */ #include <stdlib.h> #include <stdio.h> #include <sys/ptrace.h> #include <dirent.h> #include <fcntl.h> // open / O_RDONLY #include <unistd.h> // close #include <errno.h> // perror #include <string.h> // strlen static const char* odex_magic = "dey\n036"; static const char* static_safe_location = "/data/local/tmp/"; static const char* suffix = ".dumped_odex"; typedef struct { uint64_t start; uint64_t end; } memory_region; uint32_t get_clone_pid(uint32_t service_pid); uint32_t get_process_pid(const char* target_package_name); char *determine_filter(uint32_t clone_pid, int memory_fd); int find_magic_memory(uint32_t clone_pid, int memory_fd, memory_region *memory, char* extra_filter); int peek_memory(int memory_file, uint32_t address); int dump_memory(int memory_fd, memory_region *memory, const char* file_name); int attach_get_memory(uint32_t pid);
Reduce implicit calls, add fix for large memory sections
Reduce implicit calls, add fix for large memory sections
C
apache-2.0
strazzere/android-unpacker,strazzere/android-unpacker
86f56f6d510c533fe570fb6153b6c1f7b4b365a3
net/spdy/spdy_http_utils.h
net/spdy/spdy_http_utils.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 NET_SPDY_SPDY_HTTP_UTILS_H_ #define NET_SPDY_SPDY_HTTP_UTILS_H_ #pragma once #include "net/spdy/spdy_framer.h" namespace net { class HttpResponseInfo; class HttpRequestInfo; // Convert a SpdyHeaderBlock into an HttpResponseInfo. // |headers| input parameter with the SpdyHeaderBlock. // |info| output parameter for the HttpResponseInfo. // Returns true if successfully converted. False if there was a failure // or if the SpdyHeaderBlock was invalid. bool SpdyHeadersToHttpResponse(const spdy::SpdyHeaderBlock& headers, HttpResponseInfo* response); // Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from // a HttpRequestInfo block. void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info, spdy::SpdyHeaderBlock* headers, bool direct); } // namespace net #endif // NET_SPDY_SPDY_HTTP_UTILS_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 NET_SPDY_SPDY_HTTP_UTILS_H_ #define NET_SPDY_SPDY_HTTP_UTILS_H_ #pragma once #include "net/spdy/spdy_framer.h" namespace net { class HttpResponseInfo; struct HttpRequestInfo; // Convert a SpdyHeaderBlock into an HttpResponseInfo. // |headers| input parameter with the SpdyHeaderBlock. // |info| output parameter for the HttpResponseInfo. // Returns true if successfully converted. False if there was a failure // or if the SpdyHeaderBlock was invalid. bool SpdyHeadersToHttpResponse(const spdy::SpdyHeaderBlock& headers, HttpResponseInfo* response); // Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from // a HttpRequestInfo block. void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info, spdy::SpdyHeaderBlock* headers, bool direct); } // namespace net #endif // NET_SPDY_SPDY_HTTP_UTILS_H_
Change forward declaration of HttpRequestInfo from class to struct to fix build breakage.
Change forward declaration of HttpRequestInfo from class to struct to fix build breakage. BUG=none TEST=none git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@59584 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
zcbenz/cefode-chromium,zcbenz/cefode-chromium,anirudhSK/chromium,M4sse/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,keishi/chromium,anirudhSK/chromium,ltilve/chromium,markYoungH/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,keishi/chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,zcbenz/cefode-chromium,robclark/chromium,chuan9/chromium-crosswalk,hujiajie/pa-chromium,robclark/chromium,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,Chilledheart/chromium,keishi/chromium,M4sse/chromium.src,ChromiumWebApps/chromium,keishi/chromium,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,timopulkkinen/BubbleFish,ondra-novak/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,patrickm/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,jaruba/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,chuan9/chromium-crosswalk,keishi/chromium,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,M4sse/chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,littlstar/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,keishi/chromium,keishi/chromium,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,Just-D/chromium-1,jaruba/chromium.src,littlstar/chromium.src,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,patrickm/chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,ChromiumWebApps/chromium,anirudhSK/chromium,Fireblend/chromium-crosswalk,littlstar/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,rogerwang/chromium,hujiajie/pa-chromium,Just-D/chromium-1,robclark/chromium,Just-D/chromium-1,robclark/chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,dednal/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,axinging/chromium-crosswalk,Jonekee/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk,nacl-webkit/chrome_deps,anirudhSK/chromium,ChromiumWebApps/chromium,axinging/chromium-crosswalk,robclark/chromium,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,robclark/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,anirudhSK/chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,hujiajie/pa-chromium,Chilledheart/chromium,Jonekee/chromium.src,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,littlstar/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,anirudhSK/chromium,axinging/chromium-crosswalk,zcbenz/cefode-chromium,ChromiumWebApps/chromium,ltilve/chromium,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,robclark/chromium,bright-sparks/chromium-spacewalk,ltilve/chromium,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,markYoungH/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,rogerwang/chromium,robclark/chromium,dednal/chromium.src,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,littlstar/chromium.src,hujiajie/pa-chromium,anirudhSK/chromium,nacl-webkit/chrome_deps,jaruba/chromium.src,robclark/chromium,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,dednal/chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,hujiajie/pa-chromium,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,ltilve/chromium,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,patrickm/chromium.src,ondra-novak/chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,rogerwang/chromium,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,rogerwang/chromium,ltilve/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,rogerwang/chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,jaruba/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,rogerwang/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,M4sse/chromium.src,M4sse/chromium.src,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,rogerwang/chromium,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,littlstar/chromium.src,Jonekee/chromium.src
507c3e1f7f594135e33dea40f1221957df129979
mserv/mp3info.h
mserv/mp3info.h
#define MP3ID3_TITLELEN NAMELEN #define MP3ID3_ARTISTLEN AUTHORLEN #define MP3ID3_ALBUMLEN 30 #define MP3ID3_YEARLEN 4 #define MP3ID3_COMMENTLEN 30 typedef struct { int present:1; char title[MP3ID3_TITLELEN+1]; char artist[MP3ID3_ARTISTLEN+1]; char album[MP3ID3_ALBUMLEN+1]; char year[MP3ID3_YEARLEN+1]; char comment[MP3ID3_COMMENTLEN+1]; char genre[31]; } t_id3tag; int mserv_mp3info_readlen(const char *fname, int *bitrate_ret, t_id3tag *id3tag);
#define MP3ID3_TITLELEN 30 #define MP3ID3_ARTISTLEN 30 #define MP3ID3_ALBUMLEN 30 #define MP3ID3_YEARLEN 4 #define MP3ID3_COMMENTLEN 30 typedef struct { int present:1; char title[MP3ID3_TITLELEN+1]; char artist[MP3ID3_ARTISTLEN+1]; char album[MP3ID3_ALBUMLEN+1]; char year[MP3ID3_YEARLEN+1]; char comment[MP3ID3_COMMENTLEN+1]; char genre[31]; } t_id3tag; int mserv_mp3info_readlen(const char *fname, int *bitrate_ret, t_id3tag *id3tag);
Fix mp3 field size constants so that the ID3 information gets parsed correctly.
Fix mp3 field size constants so that the ID3 information gets parsed correctly.
C
isc
spigot/mserv,spigot/mserv
3dd0eb97ff69943b37d92932d0ac7b5b4324bbc8
source/config_lui.h
source/config_lui.h
// Filename: config_lui.h // Created by: tobspr (28Aug14) // #ifndef CONFIG_LUI_H #define CONFIG_LUI_H #include "pandabase.h" #include "notifyCategoryProxy.h" #include "dconfig.h" #define EXPCL_LUI EXPORT_CLASS #define EXPTP_LUI EXPORT_TEMPL ConfigureDecl(config_lui, EXPCL_LUI, EXPTP_LUI); NotifyCategoryDecl(lui, EXPCL_LUI, EXPTP_LUI); extern EXPCL_LUI void init_lui(); #ifdef INTERROGATE // Interrogate can't handle this #define unordered_map pmap #endif #endif
// Filename: config_lui.h // Created by: tobspr (28Aug14) // #ifndef CONFIG_LUI_H #define CONFIG_LUI_H #include "pandabase.h" #include "notifyCategoryProxy.h" #include "dconfig.h" #define EXPCL_LUI EXPORT_CLASS #define EXPTP_LUI EXPORT_TEMPL ConfigureDecl(config_lui, EXPCL_LUI, EXPTP_LUI); NotifyCategoryDecl(lui, EXPCL_LUI, EXPTP_LUI); extern EXPCL_LUI void init_lui(); using namespace std; #endif
Fix build with modern Panda headers
Fix build with modern Panda headers Panda3D now no longer defines `using namespace std;` (see panda3d/panda3d#335) which the LUI code relied on; Panda3D headers provide unordered_map so the #define is actually preventing that header from being parsed correctly.
C
mit
tobspr/LUI,tobspr/LUI,tobspr/LUI
9cdc25c056d3da95035b7ed9c28b78f0c23a2222
libempathy/empathy-types.h
libempathy/empathy-types.h
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ /* * Copyright (C) 2008 Collabora Ltd. * * 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 St, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> */ #ifndef __EMPATHY_TYPES_H__ #define __EMPATHY_TYPES_H__ typedef struct _EmpathyContactList EmpathyContactList; typedef struct _EmpathyContactMonitor EmpathyContactMonitor; #endif /* __EMPATHY_TYPES_H__ */
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ /* * Copyright (C) 2008 Collabora Ltd. * * 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 St, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> */ #ifndef __EMPATHY_TYPES_H__ #define __EMPATHY_TYPES_H__ typedef struct _EmpathyContactList EmpathyContactList; typedef struct _EmpathyContactMonitor EmpathyContactMonitor; #endif /* __EMPATHY_TYPES_H__ */
Add newline at end of file
Add newline at end of file From: Olivier Crête <olivier.crete@collabora.co.uk> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2439
C
lgpl-2.1
Distrotech/telepathy-account-widgets,GNOME/telepathy-account-widgets,GNOME/telepathy-account-widgets,Distrotech/telepathy-account-widgets,GNOME/telepathy-account-widgets
950c1f5c6ed2c6b05d5cf2c1162454dccd011296
phonebook_opt.c
phonebook_opt.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "phonebook_opt.h" /* FILL YOUR OWN IMPLEMENTATION HERE! */ entry *findName(char lastname[], entry *pHead) { while (pHead != NULL) { if (strcasecmp(lastname, pHead->lastName) == 0) return pHead; pHead = pHead->pNext; } return NULL; } entry *append(char lastName[], entry *e) { /* allocate memory for the new entry and put lastName */ e->pNext = (entry *) malloc(sizeof(entry)); e = e->pNext; strcpy(e->lastName, lastName); e->pNext = NULL; return e; }
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <assert.h> #include "phonebook_opt.h" entry *findName(char lastname[], entry *pHead) { while (pHead != NULL) { if (strcasecmp(lastname, pHead->lastName) == 0) return pHead; pHead = pHead->pNext; } return NULL; } entry *append(char lastName[], entry *e) { /* check whther entry is null or not */ assert(e != NULL && "[error] entry is null"); /* allocate memory for the new entry and put lastName */ e->pNext = (entry *) malloc(sizeof(entry)); e = e->pNext; strcpy(e->lastName, lastName); e->pNext = NULL; return e; }
Delete todo comments and add assert to avoid null entry
Delete todo comments and add assert to avoid null entry Delete the todo comments before the function findName. Use assert to avoid the condition of null pointer in the begining of function append.
C
bsd-2-clause
zeroplusone/phonebook,zeroplusone/phonebook
cfb065c8fc4730ea3ea371b2e9def448c5552ca5
src/core/include/iDynTree/Core/LinearForceVector3.h
src/core/include/iDynTree/Core/LinearForceVector3.h
/* * Copyright (C) Fondazione Istituto Italiano di Tecnologia * * Licensed under either the GNU Lesser General Public License v3.0 : * https://www.gnu.org/licenses/lgpl-3.0.html * or the GNU Lesser General Public License v2.1 : * https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * at your option. */ #ifndef IDYNTREE_LINEAR_FORCE_VECTOR_3_H #define IDYNTREE_LINEAR_FORCE_VECTOR_3_H #warning <iDynTree/Core/LinearForceVector3.h> is deprecated. Please use GeomVector3 and <iDynTree/Model/GeomVector3.h>. #include <iDynTree/Core/GeomVector3.h> #endif /* IDYNTREE_LINEAR_FORCE_VECTOR_3_H */
/* * Copyright (C) Fondazione Istituto Italiano di Tecnologia * * Licensed under either the GNU Lesser General Public License v3.0 : * https://www.gnu.org/licenses/lgpl-3.0.html * or the GNU Lesser General Public License v2.1 : * https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * at your option. */ #ifndef IDYNTREE_LINEAR_FORCE_VECTOR_3_H #define IDYNTREE_LINEAR_FORCE_VECTOR_3_H #warning <iDynTree/Core/LinearForceVector3.h> is deprecated. Please use GeomVector3 and <iDynTree/Core/GeomVector3.h>. #include <iDynTree/Core/GeomVector3.h> #endif /* IDYNTREE_LINEAR_FORCE_VECTOR_3_H */
Fix typo in deprecation message
Fix typo in deprecation message
C
lgpl-2.1
robotology/idyntree,robotology/idyntree,robotology/idyntree,robotology/idyntree,robotology/idyntree
e6d89d26db671755353c06ed6b353af995a03dba
src/C/pyramid_of_numbers.c
src/C/pyramid_of_numbers.c
/* Pyramid of numbers Exercise #7 from my college Make a program that's receive a number and print it like a pyramid in descending order. Example with number 5 inputted. The output must be like that: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 */ #include <stdio.h> int main() { int number; printf("Type a number: "); scanf("%d", &number); for (int i = 1; i <= number; i++) { for (int j = 1; j <= i; j++) { printf ("%d ", j); } printf ("\n"); } return 0; }
/* Pyramid of numbers Exercise #7 from my college Make a program that's receive a number and print it like a pyramid in ascending order. Example with number 5 inputted. The output must be like that: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 */ #include <stdio.h> int main() { int number; printf("Type a number: "); scanf("%d", &number); for (int i = 1; i <= number; i++) { for (int j = 1; j <= i; j++) { printf ("%d ", j); } printf ("\n"); } return 0; }
Update pyramid of numbers in C language
Update pyramid of numbers in C language
C
mit
daltonmenezes/learning-C
80d912a5fedb401cf2e80584a398238f7f083812
log.h
log.h
// // Copyright (c) 2010-2012 Linaro Limited // // All rights reserved. This program and the accompanying materials // are made available under the terms of the MIT License which accompanies // this distribution, and is available at // http://www.opensource.org/licenses/mit-license.php // // Contributors: // Alexandros Frantzis <alexandros.frantzis@linaro.org> // Jesse Barker <jesse.barker@linaro.org> // #ifndef LOG_H_ #define LOG_H_ class Log { public: static void init(bool do_debug = false) { do_debug_ = do_debug; } // Emit an informational message static void info(const char *fmt, ...); // Emit a debugging message static void debug(const char *fmt, ...); // Emit an error message static void error(const char *fmt, ...); // Explicit flush of the log buffer static void flush(); // A prefix constant that informs the logging infrastructure that the log // message is a continuation of a previous log message to be put on the // same line. static const std::string continuation_prefix; // A constant for identifying the log messages as originating from a // particular application. static std::string appname; private: static bool do_debug_; }; #endif /* LOG_H_ */
// // Copyright (c) 2010-2012 Linaro Limited // // All rights reserved. This program and the accompanying materials // are made available under the terms of the MIT License which accompanies // this distribution, and is available at // http://www.opensource.org/licenses/mit-license.php // // Contributors: // Alexandros Frantzis <alexandros.frantzis@linaro.org> // Jesse Barker <jesse.barker@linaro.org> // #ifndef LOG_H_ #define LOG_H_ #include <string> class Log { public: static void init(bool do_debug = false) { do_debug_ = do_debug; } // Emit an informational message static void info(const char *fmt, ...); // Emit a debugging message static void debug(const char *fmt, ...); // Emit an error message static void error(const char *fmt, ...); // Explicit flush of the log buffer static void flush(); // A prefix constant that informs the logging infrastructure that the log // message is a continuation of a previous log message to be put on the // same line. static const std::string continuation_prefix; // A constant for identifying the log messages as originating from a // particular application. static std::string appname; private: static bool do_debug_; }; #endif /* LOG_H_ */
Make sure to include string for the definiton of Log.
Make sure to include string for the definiton of Log.
C
mit
jessebarker/libmatrix,jessebarker/libmatrix
f8c381fff1a3c10e0f7f0c9f223f08e8d7dce0e3
include/clang/Lex/ExternalPreprocessorSource.h
include/clang/Lex/ExternalPreprocessorSource.h
//===- ExternalPreprocessorSource.h - Abstract Macro Interface --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines the ExternalPreprocessorSource interface, which enables // construction of macro definitions from some external source. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H #define LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H namespace clang { /// \brief Abstract interface for external sources of preprocessor /// information. /// /// This abstract class allows an external sources (such as the \c PCHReader) /// to provide additional macro definitions. class ExternalPreprocessorSource { public: virtual ~ExternalPreprocessorSource(); /// \brief Read the set of macros defined by this external macro source. virtual void ReadDefinedMacros() = 0; }; } #endif // LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H
//===- ExternalPreprocessorSource.h - Abstract Macro Interface --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines the ExternalPreprocessorSource interface, which enables // construction of macro definitions from some external source. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H #define LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H namespace clang { /// \brief Abstract interface for external sources of preprocessor /// information. /// /// This abstract class allows an external sources (such as the \c PCHReader) /// to provide additional macro definitions. class ExternalPreprocessorSource { public: virtual ~ExternalPreprocessorSource(); /// \brief Read the set of macros defined by this external macro source. virtual void ReadDefinedMacros() = 0; }; } #endif // LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H
Add missing newline (which breaks MSVC build???)
Add missing newline (which breaks MSVC build???) git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@92522 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
9c80f5b16d0752e1bc3f49f15b1a146b7345b9ee
Pod/Swift/APAddressBook-Bridging.h
Pod/Swift/APAddressBook-Bridging.h
// // APAddressBook-Bridging.h // APAddressBook // // Created by Alexey Belkevich on 7/31/14. // Copyright (c) 2014 alterplay. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import "APAddressBook.h" #import "APContact.h" #import "APSocialProfile.h" #import "APAddress.h" #import "APPhoneWithLabel.h"
// // APAddressBook-Bridging.h // APAddressBook // // Created by Alexey Belkevich on 7/31/14. // Copyright (c) 2014 alterplay. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import "APAddressBook.h" #import "APContact.h" #import "APSocialProfile.h" #import "APAddress.h" #import "APPhoneWithLabel.h" #import "APEmailWithLabel.h"
Add APEmailWithLabel.h to the Swift bridging file.
Add APEmailWithLabel.h to the Swift bridging file.
C
mit
Alterplay/APAddressBook,Alterplay/APAddressBook,felix-dumit/APAddressBook,felix-dumit/APAddressBook
8ab3b68ef35411be456f26d1fc0dad1ebff87141
bluetooth/bdroid_buildcfg.h
bluetooth/bdroid_buildcfg.h
/* * Copyright 2013 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 _BDROID_BUILDCFG_H #define _BDROID_BUILDCFG_H #define BTA_DISABLE_DELAY 100 /* in milliseconds */ #define BLE_VND_INCLUDED TRUE #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9} #endif
/* * Copyright 2013 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 _BDROID_BUILDCFG_H #define _BDROID_BUILDCFG_H #define BTA_DISABLE_DELAY 100 /* in milliseconds */ #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9} #endif
Disable peripheral mode in N5
Disable peripheral mode in N5 bug 16545864 Change-Id: I2273716fbce151173c067b8441e749c78e17141e
C
apache-2.0
maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead
dd6e3b76a29da1f6979717e65faf652dde20be65
include/mindbw/Types.h
include/mindbw/Types.h
#ifndef MINDBW_TYPES_H #define MINDBW_TYPES_H namespace mindbw { enum class Operator { LT, LTE, GT, GTE, EQ, NEQ, }; } #endif
#ifndef MINDBW_TYPES_H #define MINDBW_TYPES_H #include <zephyr/CExport.h> Z_NS_START(mindbw) Z_ENUM_CLASS(mindbw, Operator) { LT, LTE, GT, GTE, EQ, NEQ, }; Z_NS_END #endif
Allow types in C includes
Allow types in C includes
C
mit
DeonPoncini/mindbw,DeonPoncini/mindbw
bb71227a64ed0b093e31e0bddab4fa4d4462a0b6
include/lld/ReaderWriter/YamlContext.h
include/lld/ReaderWriter/YamlContext.h
//===- lld/ReaderWriter/YamlContext.h - object used in YAML I/O context ---===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLD_READER_WRITER_YAML_CONTEXT_H #define LLD_READER_WRITER_YAML_CONTEXT_H #include "lld/Core/LLVM.h" #include <functional> #include <memory> #include <vector> namespace lld { class File; class LinkingContext; namespace mach_o { namespace normalized { struct NormalizedFile; } } using lld::mach_o::normalized::NormalizedFile; /// When YAML I/O is used in lld, the yaml context always holds a YamlContext /// object. We need to support hetergenous yaml documents which each require /// different context info. This struct supports all clients. struct YamlContext { YamlContext() : _ctx(nullptr), _registry(nullptr), _file(nullptr), _normalizeMachOFile(nullptr) {} const LinkingContext *_ctx; const Registry *_registry; File *_file; NormalizedFile *_normalizeMachOFile; StringRef _path; }; } // end namespace lld #endif // LLD_READER_WRITER_YAML_CONTEXT_H
//===- lld/ReaderWriter/YamlContext.h - object used in YAML I/O context ---===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLD_READER_WRITER_YAML_CONTEXT_H #define LLD_READER_WRITER_YAML_CONTEXT_H #include "lld/Core/LLVM.h" #include <functional> #include <memory> #include <vector> namespace lld { class File; class LinkingContext; namespace mach_o { namespace normalized { struct NormalizedFile; } } using lld::mach_o::normalized::NormalizedFile; /// When YAML I/O is used in lld, the yaml context always holds a YamlContext /// object. We need to support hetergenous yaml documents which each require /// different context info. This struct supports all clients. struct YamlContext { const LinkingContext *_ctx = nullptr; const Registry *_registry = nullptr; File *_file = nullptr; NormalizedFile *_normalizeMachOFile = nullptr; StringRef _path; }; } // end namespace lld #endif // LLD_READER_WRITER_YAML_CONTEXT_H
Use C++11 non-static member initialization.
Use C++11 non-static member initialization. git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@234648 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/lld,llvm-mirror/lld
b493f25a14e51fa1648b6b84b2afd18326a561ca
src/bin/e_widget_iconsel.h
src/bin/e_widget_iconsel.h
/* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ #ifdef E_TYPEDEFS #else #ifndef E_WIDGET_BUTTON_H #define E_WIDGET_BUTTON_H EAPI Evas_Object *e_widget_iconsel_add(Evas *evas, Evas_Object *icon, Evas_Coord minw, Evas_Coord minh, void (*func) (void *data, void *data2), void *data, void *data2); EAPI Evas_Object *e_widget_iconsel_add_from_file(Evas *evas, char *icon, Evas_Coord minw, Evas_Coord minh, void (*func) (void *data, void *data2), void *data, void *data2); EAPI void e_widget_iconsel_select_callback_add(Evas_Object *obj, void (*func)(Evas_Object *obj, char *file, void *data), void *data); #endif #endif
/* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ #ifdef E_TYPEDEFS #else #ifndef E_WIDGET_ICONSEL_H #define E_WIDGET_ICONSEL_H EAPI Evas_Object *e_widget_iconsel_add(Evas *evas, Evas_Object *icon, Evas_Coord minw, Evas_Coord minh, char **file); EAPI Evas_Object *e_widget_iconsel_add_from_file(Evas *evas, char *icon, Evas_Coord minw, Evas_Coord minh, char **file); EAPI void e_widget_iconsel_select_callback_add(Evas_Object *obj, void (*func)(Evas_Object *obj, char *file, void *data), void *data); #endif #endif
Correct define for this file. Fix function declarations.
Correct define for this file. Fix function declarations.
C
bsd-2-clause
jordemort/e17,jordemort/e17,jordemort/e17
d655d71e6b85f7f07c738dbb1a22d6c29bb0bdbf
src/pwm.h
src/pwm.h
#ifndef PWM_H #define PWM_H void PwmInit(uint8_t channel); void PwmSetPeriod(uint8_t channel, uint32_t frequency); void PwmSetDuty(uint8_t channel, uint8_t duty); typedef struct { uint32_t frequency; uint8_t duty; } PwmOutput; #endif //PWM_H
#ifndef PWM_H #define PWM_H extern void PwmInit(uint8_t channel); extern void PwmSetPeriod(uint8_t channel, uint32_t frequency); extern void PwmSetDuty(uint8_t channel, uint8_t duty); typedef struct { uint32_t frequency; uint8_t duty; } PwmOutput; #endif //PWM_H
Update prototypes to make them more compliant.
Update prototypes to make them more compliant.
C
mit
jotux/LaunchLib,jotux/LaunchLib,jotux/LaunchLib
f5f8876e86a699dc1c43a1369c963916684ec8de
numpy/core/src/common/npy_ctypes.h
numpy/core/src/common/npy_ctypes.h
#ifndef NPY_CTYPES_H #define NPY_CTYPES_H #include <Python.h> #include "npy_import.h" /* * Check if a python type is a ctypes class. * * Works like the Py<type>_Check functions, returning true if the argument * looks like a ctypes object. * * This entire function is just a wrapper around the Python function of the * same name. */ NPY_INLINE static int npy_ctypes_check(PyTypeObject *obj) { static PyObject *py_func = NULL; PyObject *ret_obj; int ret; npy_cache_import("numpy.core._internal", "npy_ctypes_check", &py_func); if (py_func == NULL) { goto fail; } ret_obj = PyObject_CallFunctionObjArgs(py_func, (PyObject *)obj, NULL); if (ret_obj == NULL) { goto fail; } ret = PyObject_IsTrue(ret_obj); if (ret == -1) { goto fail; } return ret; fail: /* If the above fails, then we should just assume that the type is not from * ctypes */ PyErr_Clear(); return 0; } #endif
#ifndef NPY_CTYPES_H #define NPY_CTYPES_H #include <Python.h> #include "npy_import.h" /* * Check if a python type is a ctypes class. * * Works like the Py<type>_Check functions, returning true if the argument * looks like a ctypes object. * * This entire function is just a wrapper around the Python function of the * same name. */ NPY_INLINE static int npy_ctypes_check(PyTypeObject *obj) { static PyObject *py_func = NULL; PyObject *ret_obj; int ret; npy_cache_import("numpy.core._internal", "npy_ctypes_check", &py_func); if (py_func == NULL) { goto fail; } ret_obj = PyObject_CallFunctionObjArgs(py_func, (PyObject *)obj, NULL); if (ret_obj == NULL) { goto fail; } ret = PyObject_IsTrue(ret_obj); Py_DECREF(ret_obj); if (ret == -1) { goto fail; } return ret; fail: /* If the above fails, then we should just assume that the type is not from * ctypes */ PyErr_Clear(); return 0; } #endif
Add missing decref in ctypes check
BUG: Add missing decref in ctypes check
C
bsd-3-clause
jorisvandenbossche/numpy,endolith/numpy,numpy/numpy,seberg/numpy,ahaldane/numpy,rgommers/numpy,charris/numpy,jakirkham/numpy,endolith/numpy,mattip/numpy,madphysicist/numpy,madphysicist/numpy,pdebuyl/numpy,jakirkham/numpy,seberg/numpy,rgommers/numpy,jorisvandenbossche/numpy,grlee77/numpy,jakirkham/numpy,WarrenWeckesser/numpy,WarrenWeckesser/numpy,charris/numpy,anntzer/numpy,endolith/numpy,MSeifert04/numpy,mattip/numpy,madphysicist/numpy,MSeifert04/numpy,WarrenWeckesser/numpy,jorisvandenbossche/numpy,rgommers/numpy,pbrod/numpy,charris/numpy,charris/numpy,pizzathief/numpy,madphysicist/numpy,ahaldane/numpy,grlee77/numpy,numpy/numpy,MSeifert04/numpy,abalkin/numpy,pbrod/numpy,madphysicist/numpy,pizzathief/numpy,anntzer/numpy,pbrod/numpy,simongibbons/numpy,rgommers/numpy,WarrenWeckesser/numpy,jorisvandenbossche/numpy,ahaldane/numpy,WarrenWeckesser/numpy,jorisvandenbossche/numpy,pdebuyl/numpy,grlee77/numpy,simongibbons/numpy,mattip/numpy,jakirkham/numpy,abalkin/numpy,abalkin/numpy,ahaldane/numpy,pizzathief/numpy,mhvk/numpy,grlee77/numpy,mhvk/numpy,mhvk/numpy,MSeifert04/numpy,ahaldane/numpy,simongibbons/numpy,mhvk/numpy,seberg/numpy,numpy/numpy,anntzer/numpy,seberg/numpy,numpy/numpy,simongibbons/numpy,grlee77/numpy,mhvk/numpy,pizzathief/numpy,endolith/numpy,simongibbons/numpy,pbrod/numpy,jakirkham/numpy,anntzer/numpy,MSeifert04/numpy,pdebuyl/numpy,pbrod/numpy,pdebuyl/numpy,pizzathief/numpy,mattip/numpy
c78c827078ec7211971e4d42c7de8c7a0e16fd56
include/utils/ALDebug.h
include/utils/ALDebug.h
#ifndef ABSTRACT_LEARNING_DEBUG_H #define ABSTRACT_LEARNING_DEBUG_H #include <stdlib.h> #include <stdio.h> #include <assert.h> #define FUNC_PRINT(x) printf(#x"=%d in %s, %d \n",x, __func__, __LINE__); #define FUNC_PRINT_ALL(x, type) printf(#x"="#type"%"#type" in %s, %d \n",x, __func__, __LINE__); #define CHECK_POINTER(x) {if(NULL==x){FUNC_PRINT_ALL(x,p);break;}} #ifdef __cplusplus extern "C"{ #endif void al_dump_stack(); #ifdef __cplusplus } #endif //#define ALASSERT(x) assert(x) #define ALASSERT(x) \ if (!(x)) al_dump_stack();assert(x); #endif
#ifndef ABSTRACT_LEARNING_DEBUG_H #define ABSTRACT_LEARNING_DEBUG_H #include <stdlib.h> #include <stdio.h> #include <assert.h> /*Print method*/ #ifdef BUILD_FOR_ANDROID #include <android/log.h> #define ALPRINT(format, ...) __android_log_print(ANDROID_LOG_INFO, "AL", format,##__VA_ARGS__) #define ALPRINT_FL(format,...) __android_log_print(ANDROID_LOG_INFO, "AL", format", FUNC: %s, LINE: %d \n",##__VA_ARGS__, __func__, __LINE__) #else #define ALPRINT(format, ...) printf(format,##__VA_ARGS__) #define ALPRINT_FL(format,...) printf(format", FUNC: %s, LINE: %d \n", ##__VA_ARGS__,__func__, __LINE__) #endif /*Add with line and function*/ #define FUNC_PRINT(x) ALPRINT(#x"=%d in %s, %d \n",(int)(x), __func__, __LINE__); #define FUNC_PRINT_ALL(x, type) ALPRINT(#x"= "#type" %"#type" in %s, %d \n",x, __func__, __LINE__); #define CHECK_POINTER(x) {if(NULL==x){FUNC_PRINT_ALL(x,p);break;}} #ifndef BUILD_FOR_ANDROID #define ALASSERT(x) \ if (!(x)) al_dump_stack();assert(x); #else #define ALASSERT(x) \ {bool ___result = (x);\ if (!(___result))\ FUNC_PRINT((___result));} #endif #define CHECK_POINTER(x) {if(NULL==x){FUNC_PRINT_ALL(x,p);break;}} #ifdef __cplusplus extern "C"{ #endif void al_dump_stack(); #ifdef __cplusplus } #endif #endif
Add debug for android, solve all warning
Add debug for android, solve all warning
C
apache-2.0
jxt1234/Abstract_Learning,jxt1234/Abstract_Learning,jxt1234/Abstract_Learning
9be52ff3eb31ac0c1365f1f6e2a1c54c436a5dca
src/drivers/block_dev/stm32_sd/stm32f4_discovery_sd.h
src/drivers/block_dev/stm32_sd/stm32f4_discovery_sd.h
#ifndef STM32F4_DISCOVERY_SD_H_ #define STM32F4_DISCOVERY_SD_H_ #include <assert.h> #include "stm32f4xx_hal.h" #include "stm32f4xx_hal_sd.h" #include "stm324xg_eval_sd.h" #include <framework/mod/options.h> #define STM32_DMA_RX_IRQ OPTION_GET(NUMBER, dma_rx_irq) static_assert(STM32_DMA_RX_IRQ == DMA2_Stream3_IRQn); #define STM32_DMA_TX_IRQ OPTION_GET(NUMBER, dma_tx_irq) static_assert(STM32_DMA_TX_IRQ == DMA2_Stream6_IRQn); #define STM32_SDMMC_IRQ OPTION_GET(NUMBER, dma_sdmmc_irq) static_assert(STM32_SDMMC_IRQ == EXTI15_10_IRQn); #endif /* STM32F4_DISCOVERY_SD_H_ */
#ifndef STM32F4_DISCOVERY_SD_H_ #define STM32F4_DISCOVERY_SD_H_ #include <assert.h> #include "stm32f4xx_hal.h" #include "stm32f4xx_hal_sd.h" #include "stm324xg_eval_sd.h" #include <framework/mod/options.h> #define STM32_DMA_RX_IRQ OPTION_GET(NUMBER, dma_rx_irq) static_assert(STM32_DMA_RX_IRQ == DMA2_Stream3_IRQn); #define STM32_DMA_TX_IRQ OPTION_GET(NUMBER, dma_tx_irq) static_assert(STM32_DMA_TX_IRQ == DMA2_Stream6_IRQn); #define STM32_SDMMC_IRQ OPTION_GET(NUMBER, dma_sdmmc_irq) //static_assert(STM32_SDMMC_IRQ == EXTI15_10_IRQn); #endif /* STM32F4_DISCOVERY_SD_H_ */
Work on stm32_sd for stm32f4_discovery
drivers: Work on stm32_sd for stm32f4_discovery
C
bsd-2-clause
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
0bb9476c8bcf324b65715fd0c971616a7eb77b64
tests/regression/02-base/33-backwards-loop.c
tests/regression/02-base/33-backwards-loop.c
// PARAM: --sets solver td3 void main(void) { int x; int i = 41; while(i >= 12) { x = 0; i--; } }
// PARAM: --sets solver td3 void main(void) { int x; int i = 41; while(i >= 12) { x = 0; i--; } int y; int j = -40; while(-5 >= j) { y = 0; j++; } }
Add further problematic example where positive half is excluded
Def_Exc: Add further problematic example where positive half is excluded
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
162ae220b18ff32ee631202567ca85eb69823372
events/tests/UNITTESTS/doubles/equeue_stub.h
events/tests/UNITTESTS/doubles/equeue_stub.h
/* * Copyright (c) , Arm Limited and affiliates. * 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 __EQUEUE_STUB_H__ #define __EQUEUE_STUB_H__ #include "stdint.h" #include "stdbool.h" typedef struct { void *void_ptr; bool call_cb_immediately; } equeue_stub_def; extern equeue_stub_def equeue_stub; #endif
/* * Copyright (c) , Arm Limited and affiliates. * 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 __EQUEUE_STUB_H__ #define __EQUEUE_STUB_H__ #include "stdint.h" #include "stdbool.h" #ifdef __cplusplus extern "C" { #endif typedef struct { void *void_ptr; bool call_cb_immediately; } equeue_stub_def; extern equeue_stub_def equeue_stub; #ifdef __cplusplus } #endif #endif
Enable use of stub from C++
equeue: Enable use of stub from C++ Add extern "C" to the equeue_stub declaration to avoid an error when a C file implements the equeue_stub symbol (as we do in equeue_stub.c). Undefined symbols for architecture x86_64: "_equeue_stub", referenced from: Test_LoRaWANTimer_start_Test::TestBody() in Test_LoRaWANTimer.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
C
apache-2.0
mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed
d73da12174d48ca0d9f5a574542bcace01b0bd6f
mongoc-config.h
mongoc-config.h
/* * Copyright 2013 MongoDB Inc. * * 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 MONGOC_CONFIG_H #define MONGOC_CONFIG_H /* * MONGOC_ENABLE_SSL is set from configure to determine if we are * compiled with SSL support. */ #define MONGOC_ENABLE_SSL 1 #if MONGOC_ENABLE_SSL != 1 # undef MONGOC_ENABLE_SSL #endif /* * MONGOC_ENABLE_SASL is set from configure to determine if we are * compiled with SASL support. */ #define MONGOC_ENABLE_SASL 0 #if MONGOC_ENABLE_SASL != 1 # undef MONGOC_ENABLE_SASL #endif /* * Set dir for mongoc tests */ #define BINARY_DIR "../../../__submodules/mongo-c-driver/tests/binary" #endif /* MONGOC_CONFIG_H */
/* * Copyright 2013 MongoDB Inc. * * 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 MONGOC_CONFIG_H #define MONGOC_CONFIG_H /* * MONGOC_ENABLE_SSL is set from configure to determine if we are * compiled with SSL support. */ #define MONGOC_ENABLE_SSL 1 #if MONGOC_ENABLE_SSL != 1 # undef MONGOC_ENABLE_SSL #endif /* * MONGOC_ENABLE_SASL is set from configure to determine if we are * compiled with SASL support. */ #define MONGOC_ENABLE_SASL 0 #if MONGOC_ENABLE_SASL != 1 # undef MONGOC_ENABLE_SASL #endif /* * Set dir for mongoc tests */ #undef BINARY_DIR #define BINARY_DIR "../../../__submodules/mongo-c-driver/tests/binary" #endif /* MONGOC_CONFIG_H */
Fix warning when BINARY_DIR already defined
Fix warning when BINARY_DIR already defined
C
mit
alexeyvo/mongo-c-driver-build-headers,Convey-Compliance/mongo-c-driver-build-headers
c436708c65be210d2ab761a02df2b6c06bd0a85b
test/Lexer/block_cmt_end.c
test/Lexer/block_cmt_end.c
/* RUN: %clang_cc1 -E -trigraphs %s | grep bar RUN: %clang_cc1 -E -trigraphs %s | grep foo RUN: %clang_cc1 -E -trigraphs %s | not grep abc RUN: %clang_cc1 -E -trigraphs %s | not grep xyz RUN: %clang_cc1 -fsyntax-only -trigraphs -verify %s */ // This is a simple comment, /*/ does not end a comment, the trailing */ does. int i = /*/ */ 1; /* abc next comment ends with normal escaped newline: */ /* expected-warning {{escaped newline}} expected-warning {{backslash and newline}} *\ / int bar /* expected-error {{expected ';' after top level declarator}} */ /* xyz next comment ends with a trigraph escaped newline: */ /* expected-warning {{escaped newline between}} expected-warning {{backslash and newline separated by space}} expected-warning {{trigraph ends block comment}} *??/ / foo // rdar://6060752 - We should not get warnings about trigraphs in comments: // '????' /* ???? */
/* RUN: %clang_cc1 -E -trigraphs %s | grep bar RUN: %clang_cc1 -E -trigraphs %s | grep foo RUN: %clang_cc1 -E -trigraphs %s | not grep qux RUN: %clang_cc1 -E -trigraphs %s | not grep xyz RUN: %clang_cc1 -fsyntax-only -trigraphs -verify %s */ // This is a simple comment, /*/ does not end a comment, the trailing */ does. int i = /*/ */ 1; /* qux next comment ends with normal escaped newline: */ /* expected-warning {{escaped newline}} expected-warning {{backslash and newline}} *\ / int bar /* expected-error {{expected ';' after top level declarator}} */ /* xyz next comment ends with a trigraph escaped newline: */ /* expected-warning {{escaped newline between}} expected-warning {{backslash and newline separated by space}} expected-warning {{trigraph ends block comment}} *??/ / foo // rdar://6060752 - We should not get warnings about trigraphs in comments: // '????' /* ???? */
Change magic string "abc" to better magic string "qux".
Change magic string "abc" to better magic string "qux". Wait, what? So, we run Clang (and LLVM) tests in an environment where the md5sum of the input files becomes a component of the path. When testing the preprocessor, the path becomes part of the output (in line directives). In this test, we were grepping for the absence of "abc" in the output. When the stars aligned properly, the md5sum component of the path contained "abc" and the test failed. Oops. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@131147 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
1c243b427ec2605a45333ef855f698a21708452f
mojito/client-monitor.h
mojito/client-monitor.h
#include <glib-object.h> void client_monitor_add (char *sender, GObject *object); void client_monitor_remove (char *sender, GObject *object);
#include <glib-object.h> #include <dbus/dbus-glib.h> void client_monitor_init (DBusGConnection *connection); void client_monitor_add (char *sender, GObject *object); void client_monitor_remove (char *sender, GObject *object);
Add client_monitor_init to the header
Add client_monitor_init to the header
C
lgpl-2.1
GNOME/libsocialweb,lcp/mojito,lcp/mojito,ThomasBollmeier/libsocialweb-flickr-oauth,lcp/mojito,lcp/libsocialweb,GNOME/libsocialweb,lcp/libsocialweb,ThomasBollmeier/libsocialweb-flickr-oauth,GNOME/libsocialweb,ThomasBollmeier/libsocialweb-flickr-oauth,lcp/libsocialweb
4c8a566280ea16396f660ac75f30f20e515c4a18
test/native/float/common.h
test/native/float/common.h
#include "../../../src/math/reinterpret.h" #include <stdint.h> #include <float.h> #include <inttypes.h> #include <stdlib.h> #include <stdio.h> static inline _Bool approx(double x, double y) { const uint64_t mask = (1L << (DBL_MANT_DIG - FLT_MANT_DIG)) - 1; uint64_t a = reinterpret(uint64_t, x); uint64_t b = reinterpret(uint64_t, y); return a - b + mask <= 2 * mask; } static inline _Bool approxf(float x, float y) { uint32_t a = reinterpret(uint32_t, x); uint32_t b = reinterpret(uint32_t, y); return a - b + 1 <= 2; } static inline _Bool identical(float x, float y) { return reinterpret(uint32_t, x) == reinterpret(uint32_t, y); } #define verify(cond, x) if (!(cond)) { \ float y = x; \ fprintf(stderr, "Assertion `"#cond"' failed at %g (%#"PRIx32")\n", y, reinterpret(uint32_t, y)); \ abort(); \ } /* vim: set ft=c: */
#include "../../../src/math/reinterpret.h" #include <stdint.h> #include <float.h> #include <inttypes.h> #include <stdio.h> static inline _Bool approx(double x, double y) { const uint64_t mask = (1L << (DBL_MANT_DIG - FLT_MANT_DIG)) - 1; uint64_t a = reinterpret(uint64_t, x); uint64_t b = reinterpret(uint64_t, y); return a - b + mask <= 2 * mask; } static inline _Bool approxf(float x, float y) { uint32_t a = reinterpret(uint32_t, x); uint32_t b = reinterpret(uint32_t, y); return a - b + 1 <= 2; } double cimag(double _Complex); static inline _Bool capprox(double _Complex x, double _Complex y) { return approx(x, y) && approx(cimag(x), cimag(y)); } static inline _Bool identical(float x, float y) { return reinterpret(uint32_t, x) == reinterpret(uint32_t, y); } _Noreturn void abort(void); #define verify(cond, x) if (!(cond)) { \ float y = x; \ fprintf(stderr, "Assertion `"#cond"' failed at %g (%#"PRIx32")\n", y, reinterpret(uint32_t, y)); \ abort(); \ } /* vim: set ft=c: */
Test helper for complex functions
Test helper for complex functions
C
mit
jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic
c458a1c32a0bfcb1ac77cb38a648efdc1e0696ad
include/response.h
include/response.h
#ifndef CPR_RESPONSE_H #define CPR_RESPONSE_H #include <string> #include "cookies.h" #include "cprtypes.h" #include "defines.h" #include "error.h" namespace cpr { class Response { public: Response() = default; template <typename TextType, typename HeaderType, typename UrlType, typename CookiesType, typename ErrorType> Response(const long& p_status_code, TextType&& p_text, HeaderType&& p_header, UrlType&& p_url, const double& p_elapsed, ErrorType&& p_error = Error{}, CookiesType&& p_cookies = Cookies{}) : status_code{p_status_code}, text{CPR_FWD(p_text)}, header{CPR_FWD(p_header)}, url{CPR_FWD(p_url)}, elapsed{p_elapsed}, cookies{CPR_FWD(p_cookies)}, error{CPR_FWD(p_error)} {} long status_code; std::string text; Header header; Url url; double elapsed; Cookies cookies; //error conditions Error error; }; } // namespace cpr #endif
#ifndef CPR_RESPONSE_H #define CPR_RESPONSE_H #include <string> #include "cookies.h" #include "cprtypes.h" #include "defines.h" #include "error.h" namespace cpr { class Response { public: Response() = default; template <typename TextType, typename HeaderType, typename UrlType, typename CookiesType, typename ErrorType> Response(const long& p_status_code, TextType&& p_text, HeaderType&& p_header, UrlType&& p_url, const double& p_elapsed, ErrorType&& p_error = Error{}, CookiesType&& p_cookies = Cookies{}) : status_code{p_status_code}, text{CPR_FWD(p_text)}, header{CPR_FWD(p_header)}, url{CPR_FWD(p_url)}, elapsed{p_elapsed}, cookies{CPR_FWD(p_cookies)}, error{CPR_FWD(p_error)} {} long status_code; std::string text; Header header; Url url; double elapsed; Cookies cookies; Error error; }; } // namespace cpr #endif
Remove explanatory comment as it should be obvious what the member is
Remove explanatory comment as it should be obvious what the member is
C
mit
SuperV1234/cpr,SuperV1234/cpr,whoshuu/cpr,msuvajac/cpr,whoshuu/cpr,whoshuu/cpr,SuperV1234/cpr,msuvajac/cpr,msuvajac/cpr
d152f432634b2a8fe378f24e8ffb05b6599881ec
scanner/scanner.h
scanner/scanner.h
#ifndef SCANNER_H #define SCANNER_H #include <QString> #include <QChar> #include <QVector> #include "token.h" /** * @class Scanner * @brief Class representing a scanner (lexical analyzer). It takes a file path as input and generates tokens, either lazily or as a QVector. */ class Scanner { public: Scanner(const QString& sourcePath); /** * @brief Read until a token is parsed, add it to the vector of tokens and return the last one (by value). * @return the newest token. */ Token nextToken(); private: QChar peek() const; QChar next(); QString fileContent; QVector<Token> tokens; int currentChar = 0; int currentLine = 0; int currentRow = 0; }; #endif // SCANNER_H
#ifndef SCANNER_H #define SCANNER_H #include <QString> #include <QChar> #include <QVector> #include "token.h" /** * @class Scanner * @brief Class representing a scanner (lexical analyzer). It takes a file path as input and generates tokens, either lazily or as a QVector. */ class Scanner { public: Scanner(const QString& sourcePath); /** * @brief Read until a token is parsed, add it to the vector of tokens and return the last one (by value). * @return the newest token. */ Token nextToken(); private: QChar peek() const; QChar next(); QString fileContent; QVector<Token> tokens; int currentChar = 0; int currentLine = 1; int currentRow = 1; }; #endif // SCANNER_H
Set default line and row to 1
Set default line and row to 1
C
mit
bisthebis/Boboscript,bisthebis/Boboscript
5c457b95ac29e548f50e0c36287016454d8ac076
pset2/Hacker/initials.c
pset2/Hacker/initials.c
/**************************************************************************** * initials.c * * Computer Science 50 * Problem Set 2 - Hacker Edition * * Return uppercase initials of name provided. ***************************************************************************/ #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> int main(void) { // get name from user printf("Enter name: "); char* name = malloc(128*sizeof(char)); fgets (name, 128, stdin); printf("%c", toupper(name[0])); for (int i = 1; i < strlen(name); i++) { if (name[i] == ' ') { while (name[i] == ' ') i++; printf("%c", toupper(name[i])); } } printf("\n"); }
/**************************************************************************** * initials.c * * Computer Science 50 * Problem Set 2 - Hacker Edition * * Return uppercase initials of name provided. ***************************************************************************/ #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> int main(void) { // get name from user printf("Enter name: "); char* name = malloc(128*sizeof(char)); fgets (name, 128, stdin); printf("%c", toupper(name[0])); for (int i = 1, n = strlen(name); i < n; i++) { if (name[i] == ' ') { while (name[i] == ' ') i++; printf("%c", toupper(name[i])); } } printf("\n"); }
Optimize pset2 hacker edition slightly.
Optimize pset2 hacker edition slightly.
C
mit
leeorb321/CS50,leeorb321/CS50,leeorb321/CS50,leeorb321/CS50,leeorb321/CS50
41c4603134c88859218d56a3680f45dfaa02b80a
src/C++/helpers.h
src/C++/helpers.h
#include <iostream> using std::cout; using std::cin; using std::endl; string get_device_id() { cout << concol::RED << "Enumerating devices" << concol::RESET << endl; int numDevices = get_numDevices(); cout << concol::RED << numDevices << " APS device" << (numDevices > 1 ? "s": "") << " found" << concol::RESET << endl; if (numDevices < 1) return 0; cout << concol::RED << "Attempting to get serials" << concol::RESET << endl; const char ** serialBuffer = new const char*[numDevices]; get_deviceSerials(serialBuffer); for (int cnt=0; cnt < numDevices; cnt++) { cout << concol::RED << "Device " << cnt << " serial #: " << serialBuffer[cnt] << concol::RESET << endl; } string deviceSerial; if (numDevices == 1) { deviceSerial = string(serialBuffer[0]); } else { cout << "Choose device ID [0]: "; string input = ""; getline(cin, input); int device_id = 0; if (input.length() != 0) { std::stringstream mystream(input); mystream >> device_id; } deviceSerial = string(serialBuffer[device_id]); } delete[] serialBuffer; return deviceSerial; }
#include <iostream> #include <sstream> #include "concol.h" using std::cout; using std::cin; using std::endl; using std::string; string get_device_id() { cout << concol::RED << "Enumerating devices" << concol::RESET << endl; int numDevices = get_numDevices(); cout << concol::RED << numDevices << " APS device" << (numDevices > 1 ? "s": "") << " found" << concol::RESET << endl; if (numDevices < 1) return 0; cout << concol::RED << "Attempting to get serials" << concol::RESET << endl; const char ** serialBuffer = new const char*[numDevices]; get_deviceSerials(serialBuffer); for (int cnt=0; cnt < numDevices; cnt++) { cout << concol::RED << "Device " << cnt << " serial #: " << serialBuffer[cnt] << concol::RESET << endl; } string deviceSerial; if (numDevices == 1) { deviceSerial = string(serialBuffer[0]); } else { cout << "Choose device ID [0]: "; string input = ""; getline(cin, input); int device_id = 0; if (input.length() != 0) { std::stringstream mystream(input); mystream >> device_id; } deviceSerial = string(serialBuffer[device_id]); } delete[] serialBuffer; return deviceSerial; }
Add necessary include to get_device_id helper
Add necessary include to get_device_id helper
C
apache-2.0
BBN-Q/libaps2,BBN-Q/libaps2,BBN-Q/libaps2,BBN-Q/libaps2,BBN-Q/libaps2
92843c3f7aa8cc483c5c2271489197c376d95d6f
src/Stdafx.h
src/Stdafx.h
#pragma once #include <future> #include <list> #include <map> #include <set> #include <Shlwapi.h> #include "../lib/foobar2000_sdk/foobar2000/SDK/foobar2000.h" #include "../lib/tinyxml2/tinyxml2.h" #define PLUGIN_NAME "WPL Playlist support" #define PLUGIN_VERSION "1.0.2" #define CONSOLE_HEADER "foo_wpl: "
#pragma once #include <future> #include <list> #include <map> #include <set> #include <Shlwapi.h> #include "../lib/foobar2000_sdk/foobar2000/SDK/foobar2000.h" #include "../lib/tinyxml2/tinyxml2.h" #define PLUGIN_NAME "WPL Playlist support" #define PLUGIN_VERSION "1.1" #define CONSOLE_HEADER "foo_wpl: "
Update plugin version to 1.1
Update plugin version to 1.1
C
bsd-3-clause
UrbanCMC/foo_wpl
618aa06fa17c1aed3cce18218c41b2c7e517c935
src/pyfont.h
src/pyfont.h
#ifndef PYFONT_H #define PYFONT_H #include <stdint.h> #include <stddef.h> struct PyFont { PyFont(uint8_t chars, uint8_t baseChar, const uint8_t* data, const uint16_t* offsets, const uint8_t* sizes): chars(chars), baseChar(baseChar), data(data), offsets(offsets), sizes(sizes) {} uint8_t chars; uint8_t baseChar; const uint8_t* data; const uint16_t* offsets; const uint8_t* sizes; uint8_t getCharSize(char ch) const { uint16_t o = ((uint8_t)ch)-baseChar; return sizes[o]; } const uint8_t* getCharData(char ch) const { uint16_t o = ((uint8_t)ch)-baseChar; return data + offsets[o]; } }; int renderText(const PyFont& f, const char* text, uint8_t* output, int maxSize); size_t calculateRenderedLength(const PyFont& f, const char* text); #endif //PYFONT_H
#ifndef PYFONT_H #define PYFONT_H #include <stdint.h> #include <stddef.h> struct PyFont { PyFont(uint8_t chars, uint8_t baseChar, const uint8_t* data, const uint16_t* offsets, const uint8_t* sizes): chars(chars), baseChar(baseChar), data(data), offsets(offsets), sizes(sizes) {} uint8_t chars; uint8_t baseChar; const uint8_t* data; const uint16_t* offsets; const uint8_t* sizes; uint8_t getCharSize(char ch) const { if ((ch < baseChar) || (ch > (chars + baseChar))) ch = baseChar; uint16_t o = ((uint8_t)ch)-baseChar; return sizes[o]; } const uint8_t* getCharData(char ch) const { if ((ch < baseChar) || (ch > (chars + baseChar))) ch = baseChar; uint16_t o = ((uint8_t)ch)-baseChar; return data + offsets[o]; } }; int renderText(const PyFont& f, const char* text, uint8_t* output, int maxSize); size_t calculateRenderedLength(const PyFont& f, const char* text); #endif //PYFONT_H
Fix for newlines and other non-printable chars in renderer
Fix for newlines and other non-printable chars in renderer
C
mit
bartoszbielawski/InfoClock,bartoszbielawski/InfoClock
589a9d66803e323c66ef78ebf499cc49a6b65fe7
Source/World/Block/BlockDatabase.h
Source/World/Block/BlockDatabase.h
#ifndef BlockDatabase_H_INCLUDED #define BlockDatabase_H_INCLUDED #include <memory> #include <array> #include "Types/BlockType.h" #include "BlockID.h" #include "../../Texture/Texture_Atlas.h" namespace Block { class Database { public: static Database& get(); Database(); const BlockType& getBlock(uint8_t id) const; const BlockType& getBlock(ID blockID) const; const Texture::Atlas& getTextureAtlas() const; private: std::array<std::unique_ptr<BlockType>, (int)ID::NUM_BlockTypeS> m_blocks; Texture::Atlas m_textures; }; const BlockType& get(uint8_t id); const BlockType& get(ID blockID); } #endif // BlockDatabase_H_INCLUDED
#ifndef BlockDatabase_H_INCLUDED #define BlockDatabase_H_INCLUDED #include <memory> #include <array> #include "Types/BlockType.h" #include "BlockID.h" #include "../../Texture/Texture_Atlas.h" namespace Block { class Database { public: static Database& get(); const BlockType& getBlock(uint8_t id) const; const BlockType& getBlock(ID blockID) const; const Texture::Atlas& getTextureAtlas() const; private: Database(); std::array<std::unique_ptr<BlockType>, (int)ID::NUM_BlockTypeS> m_blocks; Texture::Atlas m_textures; }; const BlockType& get(uint8_t id); const BlockType& get(ID blockID); } #endif // BlockDatabase_H_INCLUDED
Fix the block database singleton
Fix the block database singleton
C
mit
Hopson97/HopsonCraft,Hopson97/HopsonCraft
56bde90e1ebe943fe005585662f93f6d65460bdd
src/lib/hex-dec.c
src/lib/hex-dec.c
/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "hex-dec.h" void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size) { unsigned int i; for (i = 0; i < hexstr_size; i++) { unsigned int value = dec & 0x0f; if (value < 10) hexstr[hexstr_size-i-1] = value + '0'; else hexstr[hexstr_size-i-1] = value - 10 + 'A'; dec >>= 4; } } uintmax_t hex2dec(const unsigned char *data, unsigned int len) { unsigned int i; uintmax_t value = 0; for (i = 0; i < len; i++) { value = value*0x10; if (data[i] >= '0' && data[i] <= '9') value += data[i]-'0'; else if (data[i] >= 'A' && data[i] <= 'F') value += data[i]-'A' + 10; else return 0; } return value; }
/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "hex-dec.h" void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size) { unsigned int i; for (i = 0; i < hexstr_size; i++) { unsigned int value = dec & 0x0f; if (value < 10) hexstr[hexstr_size-i-1] = value + '0'; else hexstr[hexstr_size-i-1] = value - 10 + 'A'; dec >>= 4; } } uintmax_t hex2dec(const unsigned char *data, unsigned int len) { unsigned int i; uintmax_t value = 0; for (i = 0; i < len; i++) { value = value*0x10; if (data[i] >= '0' && data[i] <= '9') value += data[i]-'0'; else if (data[i] >= 'A' && data[i] <= 'F') value += data[i]-'A' + 10; else if (data[i] >= 'a' && data[i] <= 'f') value += data[i]-'a' + 10; else return 0; } return value; }
Allow data to contain also lowercase hex characters.
hex2dec(): Allow data to contain also lowercase hex characters.
C
mit
jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jkerihuel/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch
99cbd5c8b2c4c6bdac752da4ec96249ad5165701
mama/c_cpp/src/c/bridge/qpid/io.h
mama/c_cpp/src/c/bridge/qpid/io.h
/* $Id$ * * OpenMAMA: The open middleware agnostic messaging API * Copyright (C) 2011 NYSE Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ #ifndef MAMA_BRIDGE_QPID_IO_H__ #define MAMA_BRIDGE_QPID_IO_H__ /*========================================================================= = Includes = =========================================================================*/ #if defined(__cplusplus) extern "C" { #endif /*========================================================================= = Public implementation functions = =========================================================================*/ mama_status qpidBridgeMamaIoImpl_start (void); mama_status qpidBridgeMamaIoImpl_stop (void); #if defined(__cplusplus) } #endif #endif /* MAMA_BRIDGE_QPID_IO_H__ */
/* $Id$ * * OpenMAMA: The open middleware agnostic messaging API * Copyright (C) 2011 NYSE Technologies, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ #ifndef MAMA_BRIDGE_QPID_IO_H__ #define MAMA_BRIDGE_QPID_IO_H__ /*========================================================================= = Includes = =========================================================================*/ #if defined(__cplusplus) extern "C" { #endif #include <mama/mama.h> /*========================================================================= = Public implementation functions = =========================================================================*/ mama_status qpidBridgeMamaIoImpl_start (void); mama_status qpidBridgeMamaIoImpl_stop (void); #if defined(__cplusplus) } #endif #endif /* MAMA_BRIDGE_QPID_IO_H__ */
Fix IO header include issue
QPID: Fix IO header include issue Resolves an issue with QPID io.h, which should include mama/mama.h. Lack of include can cause issues with some build systems. Signed-off-by: Damian Maguire <21930bd10afdadbc1f53edcd2634e8f66a5e6d7a@nyx.com>
C
lgpl-2.1
cloudsmith-io/openmama,cloudsmith-io/openmama,MattMulhern/OpenMamaCassandra,cloudsmith-io/openmama,philippreston/OpenMAMA,dmaguire/OpenMAMA,vulcanft/openmama,dmaguire/OpenMAMA,vulcanft/openmama,vulcanft/openmama,dmaguire/OpenMAMA,jacobraj/MAMA,MattMulhern/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,philippreston/OpenMAMA,MattMulhern/OpenMAMA,philippreston/OpenMAMA,dpauls/OpenMAMA,fquinner/OpenMAMA,dmagOM/OpenMAMA-dynamic,dpauls/OpenMAMA,dpauls/OpenMAMA,kuangtu/OpenMAMA,dmaguire/OpenMAMA,vulcanft/openmama,kuangtu/OpenMAMA,dmagOM/OpenMAMA-dynamic,dmaguire/OpenMAMA,philippreston/OpenMAMA,dmagOM/OpenMAMA-dynamic,kuangtu/OpenMAMA,jacobraj/MAMA,MattMulhern/OpenMAMA,dmagOM/OpenMAMA-dynamic,MattMulhern/OpenMAMA,cloudsmith-io/openmama,MattMulhern/OpenMamaCassandra,fquinner/OpenMAMA,fquinner/OpenMAMA,fquinner/OpenMAMA,vulcanft/openmama,MattMulhern/OpenMAMA,fquinner/OpenMAMA,philippreston/OpenMAMA,jacobraj/MAMA,cloudsmith-io/openmama,kuangtu/OpenMAMA,dmagOM/OpenMAMA-dynamic,fquinner/OpenMAMA,kuangtu/OpenMAMA,jacobraj/MAMA,dpauls/OpenMAMA,jacobraj/MAMA,dmaguire/OpenMAMA,MattMulhern/OpenMAMA,vulcanft/openmama,cloudsmith-io/openmama,MattMulhern/OpenMamaCassandra,MattMulhern/OpenMamaCassandra,dmagOM/OpenMAMA-dynamic,jacobraj/MAMA,cloudsmith-io/openmama,philippreston/OpenMAMA,MattMulhern/OpenMamaCassandra,kuangtu/OpenMAMA,dpauls/OpenMAMA,dpauls/OpenMAMA,kuangtu/OpenMAMA,MattMulhern/OpenMAMA,dmaguire/OpenMAMA,philippreston/OpenMAMA,MattMulhern/OpenMamaCassandra,fquinner/OpenMAMA
f4c443646d35cad3a4b8cd83bd9ddf3cbf852c09
histogram/histogram.pencil.c
histogram/histogram.pencil.c
#include "histogram.pencil.h" #include <pencil.h> static void calcHist( const int rows , const int cols , const int step , const unsigned char image[static const restrict rows][step] , int hist[static const restrict HISTOGRAM_BINS] //out ) { #pragma scop __pencil_assume(rows > 0); __pencil_assume(cols > 0); __pencil_assume(step >= cols); __pencil_kill(hist); #pragma pencil independent for(int b = 0; b < HISTOGRAM_BINS; ++b) hist[b] = 0; #pragma pencil independent reduction(+:hist) for(int r = 0; r < rows; ++r) { #pragma pencil independent reduction(+:hist) for(int c = 0; c < cols; ++c) { unsigned char pixel = image[r][c]; ++hist[pixel]; } } #pragma endscop } void pencil_calcHist( const int rows, const int cols, const int step, const unsigned char image[], int hist[HISTOGRAM_BINS]) { calcHist( rows, cols, step, (const unsigned char(*)[step])image, hist); }
#include "histogram.pencil.h" #include <pencil.h> void atomic_inc(int *v); #ifndef __PENCIL__ void atomic_inc(int *v) { (*v)++; } #endif static void calcHist( const int rows , const int cols , const int step , const unsigned char image[static const restrict rows][step] , int hist[static const restrict HISTOGRAM_BINS] //out ) { #pragma scop __pencil_assume(rows > 0); __pencil_assume(cols > 0); __pencil_assume(step >= cols); __pencil_kill(hist); #pragma pencil independent for(int b = 0; b < HISTOGRAM_BINS; ++b) hist[b] = 0; #pragma pencil independent for(int r = 0; r < rows; ++r) { #pragma pencil independent for(int c = 0; c < cols; ++c) { unsigned char pixel = image[r][c]; atomic_inc(&hist[pixel]); } } __pencil_kill(image); #pragma endscop } void pencil_calcHist( const int rows, const int cols, const int step, const unsigned char image[], int hist[HISTOGRAM_BINS]) { calcHist( rows, cols, step, (const unsigned char(*)[step])image, hist); }
Use atomic_inc function in histogram instead of reductions (which are not supported by PPCG)
Use atomic_inc function in histogram instead of reductions (which are not supported by PPCG) Former-commit-id: ff28bc0ff228606ed66e2cc1214aeff7f7f84f3b
C
mit
rbaghdadi/pencil-benchmark,pencil-language/pencil-benchmark,dividiti/pencil-benchmark,pencil-language/pencil-benchmark,pencil-language/pencil-benchmark,dividiti/pencil-benchmark,dividiti/pencil-benchmark,rbaghdadi/pencil-benchmark,rbaghdadi/pencil-benchmark
e56c3f36194858d81ac2be3c9bf26cdb54df9dc1
emu/src/process.h
emu/src/process.h
#ifndef EMULATOR_PROCESS_H #include <pthread.h> #include <stdarg.h> #define MAX_ARGS 8 // A transputer process (more like a thread) typedef struct { pthread_t thread; void* args[MAX_ARGS]; void (*func)(); } Process; // Create a new process, with entry point 'func' and given stacksize. The // 'nargs' arguments are passed to 'func' upon startup. Process *ProcAlloc (void (*func)(), int stacksize, int nargs, ...); // Start the process 'p' void ProcRun (Process *p); // Yield the rest of the time-slice to another process void ProcReschedule(); #define EMULATOR_PROCESS_H #endif // EMULATOR_PROCESS_H
#ifndef EMULATOR_PROCESS_H #include <pthread.h> // OS X does not support pthread_yield(), only pthread_yield_np() #if defined(__APPLE__) || defined(__MACH__) #define pthread_yield() pthread_yield_np() #endif #include <stdarg.h> #define MAX_ARGS 8 // A transputer process (more like a thread) typedef struct { pthread_t thread; void* args[MAX_ARGS]; void (*func)(); } Process; // Create a new process, with entry point 'func' and given stacksize. The // 'nargs' arguments are passed to 'func' upon startup. Process *ProcAlloc (void (*func)(), int stacksize, int nargs, ...); // Start the process 'p' void ProcRun (Process *p); // Yield the rest of the time-slice to another process void ProcReschedule(); #define EMULATOR_PROCESS_H #endif // EMULATOR_PROCESS_H
Fix pthread_yield() not supported by OS X
Fix pthread_yield() not supported by OS X See here for further reference: https://github.com/01org/ocr/issues/28 And here for the diff between pthread_yield() and pthread_yield_np(): http://www.linuxquestions.org/questions/programming-9/pthread_yield-vs-pthread_yield_np-469283/
C
mit
noqu/vbb,noqu/vbb
5c020deef2ee09fe0abe00ad533fba9a2411dd4a
include/siri/grammar/gramp.h
include/siri/grammar/gramp.h
/* * gramp.h - SiriDB Grammar Properties. * * Note: we need this file up-to-date with the grammar. The grammar has * keywords starting with K_ so the will all be sorted. * KW_OFFSET should be set to the first keyword and KW_COUNT needs the * last keyword in the grammar. * */ #ifndef SIRI_GRAMP_H_ #define SIRI_GRAMP_H_ #include <siri/grammar/grammar.h> /* keywords */ #define KW_OFFSET CLERI_GID_K_ACCESS #define KW_COUNT CLERI_GID_K_WRITE + 1 - KW_OFFSET /* aggregation functions */ #define F_OFFSET CLERI_GID_F_COUNT /* help statements */ #define HELP_OFFSET CLERI_GID_HELP_ACCESS #define HELP_COUNT CLERI_GID_HELP_TIMEZONES + 1 - HELP_OFFSET #if CLERI_VERSION_MINOR >= 12 #define CLERI_NODE_DATA(__node) ((intptr_t)(__node)->data) #define CLERI_NODE_DATA_ADDR(__node) ((intptr_t *) &(__node)->data) #else #define CLERI_NODE_DATA(__node) ((intptr_t)(__node)->result) #define CLERI_NODE_DATA_ADDR(__node) ((intptr_t *) &(__node)->result) #endif #endif /* SIRI_GRAMP_H_ */
/* * gramp.h - SiriDB Grammar Properties. * * Note: we need this file up-to-date with the grammar. The grammar has * keywords starting with K_ so the will all be sorted. * KW_OFFSET should be set to the first keyword and KW_COUNT needs the * last keyword in the grammar. * */ #ifndef SIRI_GRAMP_H_ #define SIRI_GRAMP_H_ #include <siri/grammar/grammar.h> /* keywords */ #define KW_OFFSET CLERI_GID_K_ACCESS #define KW_COUNT CLERI_GID_K_WRITE + 1 - KW_OFFSET /* aggregation functions */ #define F_OFFSET CLERI_GID_F_COUNT /* help statements */ #define HELP_OFFSET CLERI_GID_HELP_ACCESS #define HELP_COUNT CLERI_GID_HELP_TIMEZONES + 1 - HELP_OFFSET #if CLERI_VERSION_MINOR >= 12 #define CLERI_NODE_DATA(__node) ((intptr_t)(__node)->data) #define CLERI_NODE_DATA_ADDR(__node) ((intptr_t *) &(__node)->data) #else #define CLERI_NODE_DATA(__node) (__node)->result #define CLERI_NODE_DATA_ADDR(__node) &(__node)->result #endif #endif /* SIRI_GRAMP_H_ */
Update compat with old libcleri
Update compat with old libcleri
C
mit
transceptor-technology/siridb-server,transceptor-technology/siridb-server,transceptor-technology/siridb-server,transceptor-technology/siridb-server
87ae35cd89a8176b9fef8d1848bc7f6ef2ff41d2
include/utils/SkNullCanvas.h
include/utils/SkNullCanvas.h
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkNullCanvas_DEFINED #define SkNullCanvas_DEFINED #include "SkBitmap.h" class SkCanvas; /** * Creates a canvas that draws nothing. This is useful for performance testing. */ SkCanvas* SkCreateNullCanvas(); #endif
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkNullCanvas_DEFINED #define SkNullCanvas_DEFINED #include "SkBitmap.h" class SkCanvas; /** * Creates a canvas that draws nothing. This is useful for performance testing. */ SK_API SkCanvas* SkCreateNullCanvas(); #endif
Add SK_API to null canvas create method
Add SK_API to null canvas create method
C
bsd-3-clause
csulmone/skia,csulmone/skia,csulmone/skia,csulmone/skia
e3757fde740764ed5b1be40aefb5594e6aef4cfb
Core/include/TexCompTypes.h
Core/include/TexCompTypes.h
// Copyright 2012 (c) Pavel Krajcevski // BC7IntTypes.h // This file contains all of the various platform definitions for fixed width integers // on various platforms. // !FIXME! Still needs to be tested on Windows platforms. #ifndef _TEX_COMP_TYPES_H_ #define _TEX_COMP_TYPES_H_ // Windows? #ifdef _MSC_VER typedef __int16 int16; typedef __uint16 uint16; typedef __int32 int32; typedef __uint32 uint32; typedef __int8 int8; typedef __uint8 uint8; typedef __uint64 uint64; typedef __int64 int64; typedef __int32_ptr int32_ptr; // If not, assume GCC, or at least standard defines... #else #include <stdint.h> typedef int8_t int8; typedef int16_t int16; typedef int32_t int32; typedef int64_t int64; typedef uint8_t uint8; typedef uint16_t uint16; typedef uint32_t uint32; typedef uint64_t uint64; typedef uintptr_t int32_ptr; typedef char CHAR; #endif // _MSC_VER #endif // _TEX_COMP_TYPES_H_
// Copyright 2012 (c) Pavel Krajcevski // BC7IntTypes.h // This file contains all of the various platform definitions for fixed width integers // on various platforms. // !FIXME! Still needs to be tested on Windows platforms. #ifndef _TEX_COMP_TYPES_H_ #define _TEX_COMP_TYPES_H_ // Windows? #ifdef _MSC_VER typedef __int16 int16; typedef unsigned __int16 uint16; typedef __int32 int32; typedef unsigned __int32 uint32; typedef __int8 int8; typedef unsigned __int8 uint8; typedef unsigned __int64 uint64; typedef __int64 int64; #include <tchar.h> typedef TCHAR CHAR; // If not, assume GCC, or at least standard defines... #else #include <stdint.h> typedef int8_t int8; typedef int16_t int16; typedef int32_t int32; typedef int64_t int64; typedef uint8_t uint8; typedef uint16_t uint16; typedef uint32_t uint32; typedef uint64_t uint64; typedef char CHAR; #endif // _MSC_VER #endif // _TEX_COMP_TYPES_H_
Fix MSVC interpretation of our types.
Fix MSVC interpretation of our types.
C
apache-2.0
GammaUNC/FasTC,GammaUNC/FasTC,GammaUNC/FasTC,GammaUNC/FasTC
206caf539d9e7e426dbfc3936e49a72601500375
test/CodeGen/statements.c
test/CodeGen/statements.c
// RUN: %clang_cc1 -Wreturn-type %s -emit-llvm-only void test1(int x) { switch (x) { case 111111111111111111111111111111111111111: bar(); } } // Mismatched type between return and function result. int test2() { return; } void test3() { return 4; } void test4() { bar: baz: blong: bing: ; // PR5131 static long x = &&bar - &&baz; static long y = &&baz; &&bing; &&blong; if (y) goto *y; goto *x; } // PR3869 int test5(long long b) { static void *lbls[] = { &&lbl }; goto *b; lbl: return 0; }
// RUN: rm -f %S/statements.ll // RUN: %clang_cc1 -Wreturn-type %s -emit-llvm-only void test1(int x) { switch (x) { case 111111111111111111111111111111111111111: bar(); } } // Mismatched type between return and function result. int test2() { return; } void test3() { return 4; } void test4() { bar: baz: blong: bing: ; // PR5131 static long x = &&bar - &&baz; static long y = &&baz; &&bing; &&blong; if (y) goto *y; goto *x; } // PR3869 int test5(long long b) { static void *lbls[] = { &&lbl }; goto *b; lbl: return 0; }
Clean up in buildbot directories.
Clean up in buildbot directories. This test created a statements.ll file until about a month ago. Some buildbots still have this file in their source dir. This is the easiest way to remove the file on all bots. Then I'll revert. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@113814 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
6ea796c6cae61f9c45d4a85e84ce619b83788934
libs/console/src/cons_fmt.c
libs/console/src/cons_fmt.c
/** * Copyright (c) 2015 Runtime Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <stdarg.h> #include <stdio.h> #include <console/console.h> #define CONS_OUTPUT_MAX_LINE 128 void console_printf(const char *fmt, ...) { va_list args; char buf[CONS_OUTPUT_MAX_LINE]; int len; va_start(args, fmt); len = vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); if (len >= sizeof(buf)) { len = sizeof(buf) - 1; } if (buf[len - 1] != '\n') { if (len != sizeof(buf) - 1) { len++; } buf[len - 1] = '\n'; } console_write(buf, len); }
/** * Copyright (c) 2015 Runtime Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <stdarg.h> #include <stdio.h> #include <console/console.h> #include <os/os_time.h> #define CONS_OUTPUT_MAX_LINE 128 void console_printf(const char *fmt, ...) { va_list args; char buf[CONS_OUTPUT_MAX_LINE]; int len; len = snprintf(buf, sizeof(buf), "%lu:", os_time_get()); console_write(buf, len); va_start(args, fmt); len = vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); if (len >= sizeof(buf)) { len = sizeof(buf) - 1; } if (buf[len - 1] != '\n') { if (len != sizeof(buf) - 1) { len++; } buf[len - 1] = '\n'; } console_write(buf, len); }
Add timestamp to output in the beginning of output.
Add timestamp to output in the beginning of output.
C
apache-2.0
mlaz/mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,wes3/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,mlaz/mynewt-core,andrzej-kaczmarek/apache-mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,wes3/incubator-mynewt-core,mlaz/mynewt-core,mlaz/mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,mlaz/mynewt-core,IMGJulian/incubator-mynewt-core,wes3/incubator-mynewt-core
700975bc9b076bd9095326bb1c0e19b8763584ff
include/llvm/Analysis/BasicAliasAnalysis.h
include/llvm/Analysis/BasicAliasAnalysis.h
//===- llvm/Analysis/BasicAliasAnalysis.h - Alias Analysis Impl -*- C++ -*-===// // // This file defines the default implementation of the Alias Analysis interface // that simply implements a few identities (two different globals cannot alias, // etc), but otherwise does no analysis. // //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H #define LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Pass.h" struct BasicAliasAnalysis : public FunctionPass, public AliasAnalysis { // Pass Implementation stuff. This isn't much of a pass. // bool runOnFunction(Function &) { return false; } // getAnalysisUsage - Does not modify anything. // virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); } // alias - This is the only method here that does anything interesting... // Result alias(const Value *V1, const Value *V2) const; /// canCallModify - We are not interprocedural, so we do nothing exciting. /// Result canCallModify(const CallInst &CI, const Value *Ptr) const { return MayAlias; } /// canInvokeModify - We are not interprocedural, so we do nothing exciting. /// Result canInvokeModify(const InvokeInst &I, const Value *Ptr) const { return MayAlias; // We are not interprocedural } }; #endif
//===- llvm/Analysis/BasicAliasAnalysis.h - Alias Analysis Impl -*- C++ -*-===// // // This file defines the default implementation of the Alias Analysis interface // that simply implements a few identities (two different globals cannot alias, // etc), but otherwise does no analysis. // //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H #define LLVM_ANALYSIS_BASIC_ALIAS_ANALYSIS_H #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Pass.h" struct BasicAliasAnalysis : public ImmutablePass, public AliasAnalysis { // Pass Implementation stuff. This isn't much of a pass. // bool runOnFunction(Function &) { return false; } // getAnalysisUsage - Does not modify anything. // virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); } // alias - This is the only method here that does anything interesting... // Result alias(const Value *V1, const Value *V2) const; /// canCallModify - We are not interprocedural, so we do nothing exciting. /// Result canCallModify(const CallInst &CI, const Value *Ptr) const { return MayAlias; } /// canInvokeModify - We are not interprocedural, so we do nothing exciting. /// Result canInvokeModify(const InvokeInst &I, const Value *Ptr) const { return MayAlias; // We are not interprocedural } }; #endif
Convert BasicAA to be an immutable pass instead of a FunctionPass
Convert BasicAA to be an immutable pass instead of a FunctionPass git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@3922 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm
4ced8ab4d70ab9c420e0f22a2668f4a58fc76d40
spotify-fs.c
spotify-fs.c
#include <unistd.h> #include <stdio.h> #include <string.h> #include <pthread.h> #include <errno.h> #include "spotify-fs.h" int main(int argc, char *argv[]) { int retval = 0; char *password = NULL; char *username = malloc(SPOTIFY_USERNAME_MAXLEN); if ((getuid() == 0) || (geteuid() == 0)) { fprintf(stderr, "Running %s as root is not a good idea\n", application_name); return 1; } printf("spotify username: "); username = fgets(username, SPOTIFY_USERNAME_MAXLEN, stdin); password = getpass("spotify password: "); if (strlen(password) <= 0) { password = NULL; } /* should we do something about this, really? * Maybe put error logging here instead of in * spotify_session_init()*/ (void) spotify_session_init(username, password, NULL); retval = fuse_main(argc, argv, &spfs_operations, NULL); return retval; }
#include <unistd.h> #include <stdio.h> #include <string.h> #include <pthread.h> #include <errno.h> #include "spotify-fs.h" int main(int argc, char *argv[]) { int retval = 0; char *password = NULL; char *username = malloc(SPOTIFY_USERNAME_MAXLEN); if ((getuid() == 0) || (geteuid() == 0)) { fprintf(stderr, "Running %s as root is not a good idea\n", application_name); return 1; } printf("spotify username: "); username = fgets(username, SPOTIFY_USERNAME_MAXLEN, stdin); long username_len = strlen(username); if(username[username_len-1] == '\n') { username[username_len-1] = '\0'; } password = getpass("spotify password: "); if (strlen(password) <= 0) { password = NULL; } /* should we do something about this, really? * Maybe put error logging here instead of in * spotify_session_init()*/ (void) spotify_session_init(username, password, NULL); retval = fuse_main(argc, argv, &spfs_operations, NULL); return retval; }
Trim newline off of username
fs: Trim newline off of username Anton, be prepared to do cleanup commits after my mess. Signed-off-by: Carl Helmertz <d78a787955449ad50f586e5155db5f9260d297a8@gmail.com>
C
bsd-3-clause
raoulh/spotifile,chelmertz/spotifile,catharsis/spotifile,raoulh/spotifile,raoulh/spotifile,chelmertz/spotifile,catharsis/spotifile,catharsis/spotifile,chelmertz/spotifile
1d7cf43c8a668c22d053595702d241dc937c4142
src/animation/scene/duipageswitchanimation_p.h
src/animation/scene/duipageswitchanimation_p.h
/*************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (directui@nokia.com) ** ** This file is part of libdui. ** ** If you have questions regarding the use of this file, please contact ** Nokia at directui@nokia.com. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation ** and appearing in the file LICENSE.LGPL included in the packaging ** of this file. ** ****************************************************************************/ #ifndef DUIPAGESWITCHANIMATION_P_H #define DUIPAGESWITCHANIMATION_P_H #include "duipageswitchanimation.h" #include "duiparallelanimationgroup_p.h" class DuiSceneWindow; class QPropertyAnimation; class DuiPageSwitchAnimationPrivate : public DuiParallelAnimationGroupPrivate { Q_DECLARE_PUBLIC(DuiPageSwitchAnimation) public: DuiSceneWindow *sceneWindow; protected: DuiSceneWindow *newPage; DuiSceneWindow *oldPage; QPropertyAnimation *positionNewPageAnimation; QPropertyAnimation *positionOldPageAnimation; DuiPageSwitchAnimation::PageTransitionDirection direction; }; #endif
/*************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (directui@nokia.com) ** ** This file is part of libdui. ** ** If you have questions regarding the use of this file, please contact ** Nokia at directui@nokia.com. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation ** and appearing in the file LICENSE.LGPL included in the packaging ** of this file. ** ****************************************************************************/ #ifndef DUIPAGESWITCHANIMATION_P_H #define DUIPAGESWITCHANIMATION_P_H #include "duipageswitchanimation.h" #include "duiparallelanimationgroup_p.h" #include <QPointer> class DuiSceneWindow; class QPropertyAnimation; class DuiPageSwitchAnimationPrivate : public DuiParallelAnimationGroupPrivate { Q_DECLARE_PUBLIC(DuiPageSwitchAnimation) public: DuiSceneWindow *sceneWindow; protected: QPointer<DuiSceneWindow> newPage; QPointer<DuiSceneWindow> oldPage; QPropertyAnimation *positionNewPageAnimation; QPropertyAnimation *positionOldPageAnimation; DuiPageSwitchAnimation::PageTransitionDirection direction; }; #endif
Make DuiPageSwitchAnimation not use dangling pointers.
Changes: Make DuiPageSwitchAnimation not use dangling pointers. RevBy: TrustMe Details: That was causing a crash if it had pointers to pages that had been deleted.
C
lgpl-2.1
nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch,nemomobile-graveyard/libmeegotouch
718ff1293ce15fe3f7deb0a6498b215f38704357
Pod/ILGClasses/ILGClasses.h
Pod/ILGClasses/ILGClasses.h
// // ILGClasses.h // Pods // // Created by Isaac Greenspan on 6/22/15. // // #import <Foundation/Foundation.h> typedef BOOL(^ILGClassesClassTestBlock)(__strong Class class); @interface ILGClasses : NSObject /** * Get a set of all of the classes passing a given test. * * @param test The block with which to test each class * * @return A set of all of the classes passing the test */ + (NSSet *)classesPassingTest:(ILGClassesClassTestBlock)test; /** * Get a set of all of the classes that are a subclass of the given class. * * Includes any class for which the given class is an ancestor, no matter how far back. Does not include the given * class in the result. * * @param superclass The superclass to look for * * @return A set of all of the subclasses of the given class, including indirect subclasses. */ + (NSSet *)subclassesOfClass:(Class)superclass; /** * Get a set of all of the classes that conform to the given protocol. * * @param protocol The protocol to look for * * @return A set of all of the classes that conform to the given protocol, as well as their direct and indirect subclasses. */ + (NSSet *)classesConformingToProtocol:(Protocol *)protocol; @end
// // ILGClasses.h // Pods // // Created by Isaac Greenspan on 6/22/15. // // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN typedef BOOL(^ILGClassesClassTestBlock)(__strong Class class); @interface ILGClasses : NSObject /** * Get a set of all of the classes passing a given test. * * @param test The block with which to test each class * * @return A set of all of the classes passing the test */ + (NSSet<Class> *__nullable)classesPassingTest:(ILGClassesClassTestBlock)test; /** * Get a set of all of the classes that are a subclass of the given class. * * Includes any class for which the given class is an ancestor, no matter how far back. Does not include the given * class in the result. * * @param superclass The superclass to look for * * @return A set of all of the subclasses of the given class, including indirect subclasses. */ + (NSSet<Class> *__nullable)subclassesOfClass:(Class)superclass; /** * Get a set of all of the classes that conform to the given protocol. * * @param protocol The protocol to look for * * @return A set of all of the classes that conform to the given protocol, as well as their direct and indirect subclasses. */ + (NSSet<Class> *__nullable)classesConformingToProtocol:(Protocol *)protocol; NS_ASSUME_NONNULL_END @end
Add nullability annotations to classes header
Add nullability annotations to classes header
C
mit
designatednerd/ILGDynamicObjC,designatednerd/ILGDynamicObjC,designatednerd/ILGDynamicObjC
848692131a7081d789aa4e58e4cc5ec94c4f520a
src/include/commands/schemacmds.h
src/include/commands/schemacmds.h
/*------------------------------------------------------------------------- * * schemacmds.h * prototypes for schemacmds.c. * * * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * $PostgreSQL: pgsql/src/include/commands/schemacmds.h,v 1.13 2006/03/05 15:58:55 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef SCHEMACMDS_H #define SCHEMACMDS_H #include "nodes/parsenodes.h" extern void CreateSchemaCommand(CreateSchemaStmt *parsetree); extern void RemoveSchema(List *names, DropBehavior behavior, bool missing_ok); extern void RemoveSchemaById(Oid schemaOid); extern void RenameSchema(const char *oldname, const char *newname); extern void AlterSchemaOwner(const char *name, Oid newOwnerId); extern void AlterSchemaOwner_oid(const Oid schemaOid, Oid newOwnerId); #endif /* SCHEMACMDS_H */
/*------------------------------------------------------------------------- * * schemacmds.h * prototypes for schemacmds.c. * * * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * $PostgreSQL: pgsql/src/include/commands/schemacmds.h,v 1.14 2006/04/09 22:01:19 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef SCHEMACMDS_H #define SCHEMACMDS_H #include "nodes/parsenodes.h" extern void CreateSchemaCommand(CreateSchemaStmt *parsetree); extern void RemoveSchema(List *names, DropBehavior behavior, bool missing_ok); extern void RemoveSchemaById(Oid schemaOid); extern void RenameSchema(const char *oldname, const char *newname); extern void AlterSchemaOwner(const char *name, Oid newOwnerId); extern void AlterSchemaOwner_oid(Oid schemaOid, Oid newOwnerId); #endif /* SCHEMACMDS_H */
Fix another const-decoration mismatch, per Magnus.
Fix another const-decoration mismatch, per Magnus.
C
apache-2.0
randomtask1155/gpdb,tangp3/gpdb,rubikloud/gpdb,arcivanov/postgres-xl,rubikloud/gpdb,yazun/postgres-xl,tpostgres-projects/tPostgres,edespino/gpdb,foyzur/gpdb,xuegang/gpdb,adam8157/gpdb,foyzur/gpdb,xuegang/gpdb,ashwinstar/gpdb,janebeckman/gpdb,yazun/postgres-xl,0x0FFF/gpdb,janebeckman/gpdb,edespino/gpdb,tpostgres-projects/tPostgres,xinzweb/gpdb,edespino/gpdb,chrishajas/gpdb,CraigHarris/gpdb,lpetrov-pivotal/gpdb,cjcjameson/gpdb,Chibin/gpdb,postmind-net/postgres-xl,lpetrov-pivotal/gpdb,lintzc/gpdb,lisakowen/gpdb,0x0FFF/gpdb,foyzur/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,rvs/gpdb,techdragon/Postgres-XL,pavanvd/postgres-xl,xuegang/gpdb,jmcatamney/gpdb,zaksoup/gpdb,Quikling/gpdb,lintzc/gpdb,zaksoup/gpdb,adam8157/gpdb,lisakowen/gpdb,tangp3/gpdb,Chibin/gpdb,xinzweb/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,lintzc/gpdb,jmcatamney/gpdb,ahachete/gpdb,edespino/gpdb,chrishajas/gpdb,postmind-net/postgres-xl,xinzweb/gpdb,snaga/postgres-xl,snaga/postgres-xl,zaksoup/gpdb,jmcatamney/gpdb,chrishajas/gpdb,rvs/gpdb,oberstet/postgres-xl,edespino/gpdb,snaga/postgres-xl,50wu/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,rvs/gpdb,jmcatamney/gpdb,randomtask1155/gpdb,arcivanov/postgres-xl,lintzc/gpdb,jmcatamney/gpdb,janebeckman/gpdb,lintzc/gpdb,Quikling/gpdb,kmjungersen/PostgresXL,CraigHarris/gpdb,yuanzhao/gpdb,Chibin/gpdb,zeroae/postgres-xl,greenplum-db/gpdb,Quikling/gpdb,xuegang/gpdb,foyzur/gpdb,50wu/gpdb,50wu/gpdb,greenplum-db/gpdb,0x0FFF/gpdb,ashwinstar/gpdb,Chibin/gpdb,Chibin/gpdb,kmjungersen/PostgresXL,yuanzhao/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,adam8157/gpdb,atris/gpdb,Quikling/gpdb,techdragon/Postgres-XL,kaknikhil/gpdb,ovr/postgres-xl,ovr/postgres-xl,oberstet/postgres-xl,lpetrov-pivotal/gpdb,yazun/postgres-xl,tangp3/gpdb,lintzc/gpdb,50wu/gpdb,zaksoup/gpdb,rubikloud/gpdb,ovr/postgres-xl,zaksoup/gpdb,edespino/gpdb,rubikloud/gpdb,oberstet/postgres-xl,tpostgres-projects/tPostgres,royc1/gpdb,cjcjameson/gpdb,zeroae/postgres-xl,randomtask1155/gpdb,adam8157/gpdb,janebeckman/gpdb,lisakowen/gpdb,tpostgres-projects/tPostgres,zeroae/postgres-xl,ovr/postgres-xl,arcivanov/postgres-xl,xuegang/gpdb,rvs/gpdb,CraigHarris/gpdb,lisakowen/gpdb,cjcjameson/gpdb,atris/gpdb,50wu/gpdb,CraigHarris/gpdb,edespino/gpdb,0x0FFF/gpdb,tangp3/gpdb,royc1/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,greenplum-db/gpdb,atris/gpdb,edespino/gpdb,ashwinstar/gpdb,lpetrov-pivotal/gpdb,rubikloud/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,Quikling/gpdb,0x0FFF/gpdb,yazun/postgres-xl,royc1/gpdb,atris/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,xinzweb/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,yuanzhao/gpdb,xuegang/gpdb,edespino/gpdb,zaksoup/gpdb,royc1/gpdb,tangp3/gpdb,lpetrov-pivotal/gpdb,tpostgres-projects/tPostgres,arcivanov/postgres-xl,kaknikhil/gpdb,kmjungersen/PostgresXL,ahachete/gpdb,royc1/gpdb,ahachete/gpdb,ashwinstar/gpdb,janebeckman/gpdb,Chibin/gpdb,kaknikhil/gpdb,rvs/gpdb,janebeckman/gpdb,ahachete/gpdb,zaksoup/gpdb,ashwinstar/gpdb,50wu/gpdb,rvs/gpdb,postmind-net/postgres-xl,foyzur/gpdb,cjcjameson/gpdb,ahachete/gpdb,atris/gpdb,ahachete/gpdb,techdragon/Postgres-XL,adam8157/gpdb,ahachete/gpdb,Chibin/gpdb,tangp3/gpdb,yuanzhao/gpdb,xinzweb/gpdb,greenplum-db/gpdb,royc1/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,yuanzhao/gpdb,adam8157/gpdb,rvs/gpdb,Quikling/gpdb,adam8157/gpdb,xuegang/gpdb,Quikling/gpdb,zeroae/postgres-xl,lpetrov-pivotal/gpdb,lisakowen/gpdb,techdragon/Postgres-XL,lpetrov-pivotal/gpdb,postmind-net/postgres-xl,xuegang/gpdb,janebeckman/gpdb,Postgres-XL/Postgres-XL,cjcjameson/gpdb,rvs/gpdb,randomtask1155/gpdb,foyzur/gpdb,CraigHarris/gpdb,kmjungersen/PostgresXL,ashwinstar/gpdb,atris/gpdb,zaksoup/gpdb,greenplum-db/gpdb,Chibin/gpdb,chrishajas/gpdb,chrishajas/gpdb,xinzweb/gpdb,foyzur/gpdb,50wu/gpdb,tangp3/gpdb,lisakowen/gpdb,tangp3/gpdb,adam8157/gpdb,jmcatamney/gpdb,arcivanov/postgres-xl,chrishajas/gpdb,foyzur/gpdb,CraigHarris/gpdb,lintzc/gpdb,kaknikhil/gpdb,edespino/gpdb,randomtask1155/gpdb,xinzweb/gpdb,CraigHarris/gpdb,Quikling/gpdb,chrishajas/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,pavanvd/postgres-xl,0x0FFF/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,lisakowen/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,lisakowen/gpdb,xinzweb/gpdb,oberstet/postgres-xl,pavanvd/postgres-xl,yuanzhao/gpdb,atris/gpdb,cjcjameson/gpdb,randomtask1155/gpdb,greenplum-db/gpdb,lintzc/gpdb,Quikling/gpdb,ahachete/gpdb,atris/gpdb,snaga/postgres-xl,janebeckman/gpdb,yuanzhao/gpdb,Postgres-XL/Postgres-XL,Chibin/gpdb,ovr/postgres-xl,royc1/gpdb,cjcjameson/gpdb,50wu/gpdb,rubikloud/gpdb,janebeckman/gpdb,chrishajas/gpdb,lintzc/gpdb,snaga/postgres-xl,randomtask1155/gpdb,randomtask1155/gpdb,janebeckman/gpdb,royc1/gpdb,Chibin/gpdb,Quikling/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,rubikloud/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,xuegang/gpdb,yazun/postgres-xl,postmind-net/postgres-xl,rubikloud/gpdb,techdragon/Postgres-XL,kmjungersen/PostgresXL,kaknikhil/gpdb,Postgres-XL/Postgres-XL,zeroae/postgres-xl
5e1e13c695494d5ff63c0f50e4b7641ae23144c3
sx_slentry.h
sx_slentry.h
#ifndef SX_SLENTRY_H_ #define SX_SLENTRY_H_ #if HAVE_SYS_QUEUE_H #include <sys/queue.h> #else #include "sys_queue.h" #endif #if HAVE_SYS_TREE_H #include <sys/tree.h> #else #include "sys_tree.h" #endif struct sx_slentry { STAILQ_ENTRY(sx_slentry) next; char* text; }; struct sx_slentry* sx_slentry_new(char* text); struct sx_tentry { RB_ENTRY(sx_tentry) entry; char* text; }; struct sx_tentry* sx_tentry_new(char* text); #endif
#ifndef SX_SLENTRY_H_ #define SX_SLENTRY_H_ #if HAVE_SYS_QUEUE_H #include <sys/queue.h> /* OpenBSD-current as of 2015-08-30 does not define STAILQ_ENTRY anymore */ #ifndef STAILQ_ENTRY #include "sys_queue.h" #endif #else #include "sys_queue.h" #endif #if HAVE_SYS_TREE_H #include <sys/tree.h> #else #include "sys_tree.h" #endif struct sx_slentry { STAILQ_ENTRY(sx_slentry) next; char* text; }; struct sx_slentry* sx_slentry_new(char* text); struct sx_tentry { RB_ENTRY(sx_tentry) entry; char* text; }; struct sx_tentry* sx_tentry_new(char* text); #endif
Check if sys/queue.h have STAILQ_ interface. At least OpenBSD's one does not...
Check if sys/queue.h have STAILQ_ interface. At least OpenBSD's one does not...
C
bsd-2-clause
ledeuns/bgpq3,kjniemi/bgpq3,ledeuns/bgpq3,ledeuns/bgpq3,kjniemi/bgpq3,kjniemi/bgpq3
de2899279eea8bf9500363738630d5afc27f05f8
features/mbedtls/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/mbedtls_device.h
features/mbedtls/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/mbedtls_device.h
/* * mbedtls_device.h ******************************************************************************* * Copyright (c) 2017, STMicroelectronics * 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_H #define MBEDTLS_DEVICE_H #define MBEDTLS_AES_ALT #define MBEDTLS_SHA256_ALT #define MBEDTLS_SHA1_ALT #endif /* MBEDTLS_DEVICE_H */
/* * mbedtls_device.h ******************************************************************************* * Copyright (c) 2017, STMicroelectronics * 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_H #define MBEDTLS_DEVICE_H #define MBEDTLS_AES_ALT #define MBEDTLS_SHA256_ALT #define MBEDTLS_SHA1_ALT #define MBEDTLS_MD5_ALT #define MBEDTLS_MD5_C #endif /* MBEDTLS_DEVICE_H */
Move MBEDTLS_MD5_C from mbetdls_device.h to targets.json
Move MBEDTLS_MD5_C from mbetdls_device.h to targets.json
C
apache-2.0
CalSol/mbed,karsev/mbed-os,HeadsUpDisplayInc/mbed,svogl/mbed-os,catiedev/mbed-os,kjbracey-arm/mbed,mazimkhan/mbed-os,c1728p9/mbed-os,betzw/mbed-os,YarivCol/mbed-os,infinnovation/mbed-os,HeadsUpDisplayInc/mbed,ryankurte/mbed-os,ryankurte/mbed-os,c1728p9/mbed-os,mazimkhan/mbed-os,YarivCol/mbed-os,Archcady/mbed-os,mbedmicro/mbed,catiedev/mbed-os,Archcady/mbed-os,betzw/mbed-os,Archcady/mbed-os,mbedmicro/mbed,ryankurte/mbed-os,andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,catiedev/mbed-os,mbedmicro/mbed,c1728p9/mbed-os,catiedev/mbed-os,svogl/mbed-os,nRFMesh/mbed-os,YarivCol/mbed-os,mazimkhan/mbed-os,andcor02/mbed-os,YarivCol/mbed-os,catiedev/mbed-os,CalSol/mbed,CalSol/mbed,nRFMesh/mbed-os,andcor02/mbed-os,HeadsUpDisplayInc/mbed,kjbracey-arm/mbed,catiedev/mbed-os,betzw/mbed-os,CalSol/mbed,kjbracey-arm/mbed,karsev/mbed-os,kjbracey-arm/mbed,betzw/mbed-os,HeadsUpDisplayInc/mbed,betzw/mbed-os,ryankurte/mbed-os,infinnovation/mbed-os,Archcady/mbed-os,infinnovation/mbed-os,mbedmicro/mbed,betzw/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os,karsev/mbed-os,andcor02/mbed-os,svogl/mbed-os,nRFMesh/mbed-os,HeadsUpDisplayInc/mbed,svogl/mbed-os,Archcady/mbed-os,svogl/mbed-os,karsev/mbed-os,infinnovation/mbed-os,mazimkhan/mbed-os,nRFMesh/mbed-os,YarivCol/mbed-os,Archcady/mbed-os,nRFMesh/mbed-os,mazimkhan/mbed-os,YarivCol/mbed-os,karsev/mbed-os,andcor02/mbed-os,CalSol/mbed,mazimkhan/mbed-os,svogl/mbed-os,c1728p9/mbed-os,infinnovation/mbed-os,karsev/mbed-os,ryankurte/mbed-os,ryankurte/mbed-os,CalSol/mbed,infinnovation/mbed-os,nRFMesh/mbed-os,HeadsUpDisplayInc/mbed
7c437002355eeda375cc4616e6cde5729a871b23
modules/luni/src/main/native/include/shared/exceptions.h
modules/luni/src/main/native/include/shared/exceptions.h
/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef EXCEPTIONS_H #define EXCEPTIONS_H #include <string.h> #include "vmi.h" void throwNewExceptionByName(JNIEnv* env, const char* name, const char* message); void throwNewOutOfMemoryError(JNIEnv* env, const char* message); void throwJavaIoIOException(JNIEnv* env, const char* message); void throwJavaIoIOExceptionClosed(JNIEnv* env); void throwNPException(JNIEnv* env, const char* message); void throwIndexOutOfBoundsException(JNIEnv* env); #endif
/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef EXCEPTIONS_H #define EXCEPTIONS_H #include <string.h> #include "vmi.h" #ifdef __cplusplus extern "C" { #endif void throwNewExceptionByName(JNIEnv* env, const char* name, const char* message); void throwNewOutOfMemoryError(JNIEnv* env, const char* message); void throwJavaIoIOException(JNIEnv* env, const char* message); void throwJavaIoIOExceptionClosed(JNIEnv* env); void throwNPException(JNIEnv* env, const char* message); void throwIndexOutOfBoundsException(JNIEnv* env); #ifdef __cplusplus } #endif #endif
Fix C++ compilation on windows.
Fix C++ compilation on windows. svn path=/incubator/harmony/enhanced/classlib/trunk/; revision=423414
C
apache-2.0
freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM
e454c0d607937d13dbd72e4b28b8fc76cc18c281
include/llvm/Transforms/Utils/FunctionUtils.h
include/llvm/Transforms/Utils/FunctionUtils.h
//===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- 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 family of transformations manipulate LLVM functions. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H #define LLVM_TRANSFORMS_UTILS_FUNCTION_H namespace llvm { class Function; class Loop; /// ExtractCodeRegion - rip out a sequence of basic blocks into a new function /// Function* ExtractCodeRegion(const std::vector<BasicBlock*> &code); /// ExtractLoop - rip out a natural loop into a new function /// Function* ExtractLoop(Loop *L); /// ExtractBasicBlock - rip out a basic block into a new function /// Function* ExtractBasicBlock(BasicBlock *BB); } #endif
//===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- 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 family of transformations manipulate LLVM functions. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H #define LLVM_TRANSFORMS_UTILS_FUNCTION_H #include <vector> namespace llvm { class BasicBlock; class Function; class Loop; /// ExtractCodeRegion - rip out a sequence of basic blocks into a new function /// Function* ExtractCodeRegion(const std::vector<BasicBlock*> &code); /// ExtractLoop - rip out a natural loop into a new function /// Function* ExtractLoop(Loop *L); /// ExtractBasicBlock - rip out a basic block into a new function /// Function* ExtractBasicBlock(BasicBlock *BB); } #endif
Make this header file self-contained
Make this header file self-contained git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@12480 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap
ef8f03fe761ede729d5e1ee93f70ae6c40994bad
ir/be/ia32/ia32_optimize.h
ir/be/ia32/ia32_optimize.h
/* * This file is part of libFirm. * Copyright (C) 2012 University of Karlsruhe. */ /** * @file * @brief Implements several optimizations for IA32. * @author Christian Wuerdig */ #ifndef FIRM_BE_IA32_IA32_OPTIMIZE_H #define FIRM_BE_IA32_IA32_OPTIMIZE_H #include "firm_types.h" /** * Prepares irg for codegeneration. */ void ia32_pre_transform_phase(ir_graph *irg); /** * Performs conv and address mode optimizations. * @param cg The ia32 codegenerator object */ void ia32_optimize_graph(ir_graph *irg); /** * Performs Peephole Optimizations an a graph. * * @param irg the graph * @param cg the code generator object */ void ia32_peephole_optimization(ir_graph *irg); /** Initialize the ia32 address mode optimizer. */ void ia32_init_optimize(void); #endif
/* * This file is part of libFirm. * Copyright (C) 2012 University of Karlsruhe. */ /** * @file * @brief Implements several optimizations for IA32. * @author Christian Wuerdig */ #ifndef FIRM_BE_IA32_IA32_OPTIMIZE_H #define FIRM_BE_IA32_IA32_OPTIMIZE_H #include "firm_types.h" /** * Performs conv and address mode optimizations. * @param cg The ia32 codegenerator object */ void ia32_optimize_graph(ir_graph *irg); /** * Performs Peephole Optimizations an a graph. * * @param irg the graph * @param cg the code generator object */ void ia32_peephole_optimization(ir_graph *irg); /** Initialize the ia32 address mode optimizer. */ void ia32_init_optimize(void); #endif
Remove stale declaration of 'ia32_pre_transform_phase()'.
ia32: Remove stale declaration of 'ia32_pre_transform_phase()'. This function was deleted in 2007!
C
lgpl-2.1
jonashaag/libfirm,libfirm/libfirm,MatzeB/libfirm,libfirm/libfirm,jonashaag/libfirm,jonashaag/libfirm,jonashaag/libfirm,MatzeB/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,MatzeB/libfirm,libfirm/libfirm,jonashaag/libfirm,MatzeB/libfirm,MatzeB/libfirm
0fe071307ac99f08e8160df36413065a3bafe1a6
arch/sparc/include/atomic.h
arch/sparc/include/atomic.h
/* $OpenBSD: atomic.h,v 1.2 2007/02/19 17:18:43 deraadt Exp $ */ /* Public Domain */ #ifndef __SPARC_ATOMIC_H__ #define __SPARC_ATOMIC_H__ #if defined(_KERNEL) static __inline void atomic_setbits_int(__volatile unsigned int *uip, unsigned int v) { *uip |= v; } static __inline void atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v) { *uip &= ~v; } #endif /* defined(_KERNEL) */ #endif /* __SPARC_ATOMIC_H__ */
/* $OpenBSD: atomic.h,v 1.3 2007/04/27 19:22:47 miod Exp $ */ /* Public Domain */ #ifndef __SPARC_ATOMIC_H__ #define __SPARC_ATOMIC_H__ #if defined(_KERNEL) static __inline void atomic_setbits_int(__volatile unsigned int *uip, unsigned int v) { int psr; psr = getpsr(); setpsr(psr | PSR_PIL); *uip |= v; setpsr(psr); } static __inline void atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v) { int psr; psr = getpsr(); setpsr(psr | PSR_PIL); *uip &= ~v; setpsr(psr); } #endif /* defined(_KERNEL) */ #endif /* __SPARC_ATOMIC_H__ */
Disable interrupts around bit operations; ok deraadt@
Disable interrupts around bit operations; ok deraadt@
C
isc
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
060812dc5b6fe3c2f0005da3559af6694153fae5
base/macros.h
base/macros.h
// Please don't add a copyright notice to this file. It contains source code // owned by other copyright holders (used under license). #ifndef BASE_MACROS_H_ #define BASE_MACROS_H_ // From Google C++ Style Guide // http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml // Accessed February 8, 2013 // // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class // // TODO(dss): Use C++11's "= delete" syntax to suppress the creation of default // class members. #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) // Example from the Google C++ Style Guide: // // class Foo { // public: // Foo(int f); // ~Foo(); // // private: // DISALLOW_COPY_AND_ASSIGN(Foo); // }; // A macro to compute the number of elements in a statically allocated array. #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) #endif // BASE_MACROS_H_
// Please don't add a copyright notice to this file. It contains source code // owned by other copyright holders (used under license). #ifndef BASE_MACROS_H_ #define BASE_MACROS_H_ // A macro to disallow the copy constructor and operator= functions. #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&) = delete; \ void operator=(const TypeName&) = delete // A macro to compute the number of elements in a statically allocated array. #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) #endif // BASE_MACROS_H_
Modify the DISALLOW_COPY_AND_ASSIGN macro to use C++11's '= delete' syntax.
Modify the DISALLOW_COPY_AND_ASSIGN macro to use C++11's '= delete' syntax.
C
apache-2.0
snyderek/floating_temple,snyderek/floating_temple,snyderek/floating_temple
ebdb000f40a6a2a8f560314e15616000a3c56b7a
tmcd/decls.h
tmcd/decls.h
/* * EMULAB-COPYRIGHT * Copyright (c) 2000-2004 University of Utah and the Flux Group. * All rights reserved. */ #define TBSERVER_PORT 7777 #define TBSERVER_PORT2 14447 #define MYBUFSIZE 2048 #define BOSSNODE_FILENAME "bossnode" /* * As the tmcd changes, incompatable changes with older version of * the software cause problems. Starting with version 3, the client * will tell tmcd what version they are. If no version is included, * assume its DEFAULT_VERSION. * * Be sure to update the versions as the TMCD changes. Both the * tmcc and tmcd have CURRENT_VERSION compiled in, so be sure to * install new versions of each binary when the current version * changes. libsetup.pm module also encodes a current version, so be * sure to change it there too! * * Note, this is assumed to be an integer. No need for 3.23.479 ... * NB: See ron/libsetup.pm. That is version 4! I'll merge that in. */ #define DEFAULT_VERSION 2 #define CURRENT_VERSION 17
/* * EMULAB-COPYRIGHT * Copyright (c) 2000-2004 University of Utah and the Flux Group. * All rights reserved. */ #define TBSERVER_PORT 7777 #define TBSERVER_PORT2 14447 #define MYBUFSIZE 2048 #define BOSSNODE_FILENAME "bossnode" /* * As the tmcd changes, incompatable changes with older version of * the software cause problems. Starting with version 3, the client * will tell tmcd what version they are. If no version is included, * assume its DEFAULT_VERSION. * * Be sure to update the versions as the TMCD changes. Both the * tmcc and tmcd have CURRENT_VERSION compiled in, so be sure to * install new versions of each binary when the current version * changes. libsetup.pm module also encodes a current version, so be * sure to change it there too! * * Note, this is assumed to be an integer. No need for 3.23.479 ... * NB: See ron/libsetup.pm. That is version 4! I'll merge that in. */ #define DEFAULT_VERSION 2 #define CURRENT_VERSION 18
Update current version 18. Described in tmcd/tmcd.c commit 1.232.
Update current version 18. Described in tmcd/tmcd.c commit 1.232.
C
agpl-3.0
nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome
688f0e388bbb0ae4420c8e3145e83cb15d9b3829
ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h
ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h
#define MICROPY_HW_BOARD_NAME "Arduino MKR1300" #define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_PORT_A (PORT_PA24 | PORT_PA25) #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) #include "internal_flash.h" #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) #define DEFAULT_I2C_BUS_SCL (&pin_PA09) #define DEFAULT_I2C_BUS_SDA (&pin_PA08) #define DEFAULT_SPI_BUS_SCK (&pin_PA13) #define DEFAULT_SPI_BUS_MOSI (&pin_PA12) #define DEFAULT_SPI_BUS_MISO (&pin_PA15) #define DEFAULT_UART_BUS_RX (&pin_PB23) #define DEFAULT_UART_BUS_TX (&pin_PB22) // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1
#define MICROPY_HW_BOARD_NAME "Arduino MKR1300" #define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_PORT_A (0) #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) #define DEFAULT_I2C_BUS_SCL (&pin_PA09) #define DEFAULT_I2C_BUS_SDA (&pin_PA08) #define DEFAULT_SPI_BUS_SCK (&pin_PA13) #define DEFAULT_SPI_BUS_MOSI (&pin_PA12) #define DEFAULT_SPI_BUS_MISO (&pin_PA15) #define DEFAULT_UART_BUS_RX (&pin_PB23) #define DEFAULT_UART_BUS_TX (&pin_PB22) // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1
Update MKR1300 board definition too
Update MKR1300 board definition too
C
mit
adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython
4326070fe4b5f9f92c6dca263b9cfb53236537c8
fs/fs/src/fs_mkdir.c
fs/fs/src/fs_mkdir.c
/* * 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. */ #include <fs/fs.h> #include <fs/fs_if.h> #include "fs_priv.h" int fs_rename(const char *from, const char *to) { struct fs_ops *fops = safe_fs_ops_for("fatfs"); return fops->f_rename(from, to); } int fs_mkdir(const char *path) { struct fs_ops *fops = safe_fs_ops_for("fatfs"); return fops->f_mkdir(path); }
/* * 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. */ #include <fs/fs.h> #include <fs/fs_if.h> #include "fs_priv.h" struct fs_ops *fops_from_filename(const char *); int fs_rename(const char *from, const char *to) { struct fs_ops *fops = fops_from_filename(from); return fops->f_rename(from, to); } int fs_mkdir(const char *path) { struct fs_ops *fops = fops_from_filename(path); return fops->f_mkdir(path); }
Update for compatibility with multiple FS
Update for compatibility with multiple FS
C
apache-2.0
mlaz/mynewt-core,andrzej-kaczmarek/apache-mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,mlaz/mynewt-core,wes3/incubator-mynewt-core,mlaz/mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,wes3/incubator-mynewt-core,mlaz/mynewt-core,andrzej-kaczmarek/apache-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,wes3/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,mlaz/mynewt-core,IMGJulian/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core
b0daf7e3a2529dd9950d77a96a10233d68778f32
json-glib/json-glib.h
json-glib/json-glib.h
#ifndef __JSON_GLIB_H__ #define __JSON_GLIB_H__ #include <json-glib/json-types.h> #include <json-glib/json-scanner.h> #include <json-glib/json-generator.h> #include <json-glib/json-parser.h> #include <json-glib/json-version.h> #endif /* __JSON_GLIB_H__ */
#ifndef __JSON_GLIB_H__ #define __JSON_GLIB_H__ #include <json-glib/json-types.h> #include <json-glib/json-scanner.h> #include <json-glib/json-generator.h> #include <json-glib/json-parser.h> #include <json-glib/json-version.h> #include <json-glib/json-enum-types.h> #endif /* __JSON_GLIB_H__ */
Include the newly added json-enum-types.h header
Include the newly added json-enum-types.h header When including json-glib/json-glib.h we get everything json-glib expose as a public symbol.
C
lgpl-2.1
frida/json-glib,GNOME/json-glib,robtaylor/json-glib-gvariant,oerdnj/json-glib,ebassi/json-glib,robtaylor/json-glib-gvariant,frida/json-glib,GNOME/json-glib,Distrotech/json-glib,oerdnj/json-glib,oerdnj/json-glib,Distrotech/json-glib,brauliobo/json-glib,brauliobo/json-glib,oerdnj/json-glib,brauliobo/json-glib,ebassi/json-glib,Distrotech/json-glib,ebassi/json-glib
a827c1facd4eba0f308796e9cda7a8815c06c7f8
3RVX/SettingsDefaults.h
3RVX/SettingsDefaults.h
#pragma once #include "MeterWnd/Animations/AnimationTypes.h" #include "Settings.h" class SettingsDefaults { public: /* Default settings */ static const bool OnTop = true; static const AnimationTypes::HideAnimation DefaultHideAnim = AnimationTypes::Fade; static const bool HideFullscreen = false; static const bool HideDirectX = false; static const int HideSpeed = 765; static const int HideTime = 800; static constexpr const float VolumeLimit = 1.0f; static const bool NotifyIcon = true; static const bool ShowOnStartup = true; static const bool SoundsEnabled = true; static const int OSDOffset = 140; static const Settings::OSDPos OSDPosition = Settings::OSDPos::Bottom; static const bool AutoUpdate = false; static const bool MuteLock = false; static const bool SubscribeVolumeEvents = true; static const bool SubscribeEjectEvents = true; static const bool VolumeOSDEnabled = true; static const bool EjectOSDEnabled = true; static const bool BrightnessOSDEnabled = true; static const bool KeyboardOSDEnabled = false; };
#pragma once #include "MeterWnd/Animations/AnimationTypes.h" #include "Settings.h" class SettingsDefaults { public: /* String Constants*/ static constexpr const wchar_t *Language = L"English"; static constexpr const wchar_t *Skin = L"Classic"; static constexpr const wchar_t *MainAppName = L"3RVX.exe"; static constexpr const wchar_t *SettingsAppName = L"Settings.exe"; static constexpr const wchar_t *SettingsFileName = L"Settings.xml"; static constexpr const wchar_t *LanguageDirName = L"Languages"; static constexpr const wchar_t *SkinDirName = L"Skins"; static constexpr const wchar_t *SkinFileName = L"Skin.xml"; /* OSDs */ static const bool VolumeOSDEnabled = true; static const bool EjectOSDEnabled = true; static const bool BrightnessOSDEnabled = true; static const bool KeyboardOSDEnabled = false; static const bool OnTop = true; static const bool HideFullscreen = false; static const bool HideDirectX = false; static const AnimationTypes::HideAnimation DefaultHideAnim = AnimationTypes::Fade; static const int HideSpeed = 765; static const int HideTime = 800; static constexpr const float VolumeLimit = 1.0f; static const bool NotifyIcon = true; static const bool ShowOnStartup = true; static const bool SoundsEnabled = true; static const int OSDOffset = 140; static const Settings::OSDPos OSDPosition = Settings::OSDPos::Bottom; static const bool AutoUpdate = false; static const bool MuteLock = false; static const bool SubscribeVolumeEvents = true; static const bool SubscribeEjectEvents = true; };
Add string constants and reorganize defaults
Add string constants and reorganize defaults
C
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX
1bf082ea8864b04f6bb15889fba66e092fd6b2f8
lib/shared/mem.h
lib/shared/mem.h
#ifndef MEM_H__ #define MEM_H__ #include <stdlib.h> #include "ocomm/o_log.h" void *xmalloc (size_t size); void *xcalloc (size_t count, size_t size); void *xrealloc (void *ptr, size_t size); size_t xmalloc_usable_size(void *ptr); char *xstralloc (size_t len); void *xmemdupz (const void *data, size_t len); char *xstrndup (const char *str, size_t len); void xfree (void *ptr); size_t xmembytes(); size_t xmemnew(); size_t xmemfreed(); char *xmemsummary (); void xmemreport (int loglevel); #endif /* MEM_H__ */ /* Local Variables: mode: C tab-width: 2 indent-tabs-mode: nil End: vim: sw=2:sts=2:expandtab */
#ifndef MEM_H__ #define MEM_H__ #include <stdlib.h> #include "ocomm/o_log.h" void *xmalloc (size_t size); void *xcalloc (size_t count, size_t size); void *xrealloc (void *ptr, size_t size); size_t xmalloc_usable_size(void *ptr); char *xstralloc (size_t len); void *xmemdupz (const void *data, size_t len); char *xstrndup (const char *str, size_t len); void xfree (void *ptr); size_t xmembytes(); size_t xmemnew(); size_t xmemfreed(); char *xmemsummary (); void xmemreport (int loglevel); /* Duplicate nil-terminated string * * \param str string to copy in the new xchunk * \return the newly allocated xchunk, or NULL * \see xstrndup * \see strndup(3), strlen(3) */ #define xstrdup(str) xstrndup((str), strlen((str))) #endif /* MEM_H__ */ /* Local Variables: mode: C tab-width: 2 indent-tabs-mode: nil End: vim: sw=2:sts=2:expandtab */
Add xstrdup as a convenience macro around xstrndup
Add xstrdup as a convenience macro around xstrndup Signed-off-by: Olivier Mehani <b6547e8761a9172c977da5c389270d45960e4aa0@ssji.net>
C
mit
alco90/soml,mytestbed/oml,lees0414/EUproject,mytestbed/oml,mytestbed/oml,lees0414/EUproject,lees0414/EUproject,mytestbed/oml,mytestbed/oml,alco90/soml,lees0414/EUproject,alco90/soml,lees0414/EUproject,alco90/soml,alco90/soml
79ad033eb47e12d5ea50015d10855c6ff3bc535b
src/ctypes/type_info_stubs.h
src/ctypes/type_info_stubs.h
/* * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. */ #ifndef TYPE_INFO_STUBS_H #define TYPE_INFO_STUBS_H #include <caml/mlvalues.h> #include <caml/fail.h> #include <caml/callback.h> /* allocate_unpassable_struct_type_info : (size, alignment) -> _ ctype */ value ctypes_allocate_unpassable_struct_type_info(int size, int alignment); /* Read a C value from a block of memory */ /* read : 'a prim -> offset:int -> raw_pointer -> 'a */ extern value ctypes_read(value ctype, value offset, value buffer); /* Write a C value to a block of memory */ /* write : 'a prim -> offset:int -> 'a -> raw_pointer -> unit */ extern value ctypes_write(value ctype, value offset, value v, value buffer); #endif /* TYPE_INFO_STUBS_H */
/* * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. */ #ifndef TYPE_INFO_STUBS_H #define TYPE_INFO_STUBS_H #include <caml/mlvalues.h> /* Read a C value from a block of memory */ /* read : 'a prim -> offset:int -> raw_pointer -> 'a */ extern value ctypes_read(value ctype, value offset, value buffer); /* Write a C value to a block of memory */ /* write : 'a prim -> offset:int -> 'a -> raw_pointer -> unit */ extern value ctypes_write(value ctype, value offset, value v, value buffer); #endif /* TYPE_INFO_STUBS_H */
Remove another obsolete function declaration.
Remove another obsolete function declaration.
C
mit
yallop/ocaml-ctypes,fdopen/ocaml-ctypes,dsheets/ocaml-ctypes,sjfloat/ocaml-ctypes,yallop/ocaml-ctypes,whitequark/ocaml-ctypes,whitequark/ocaml-ctypes,sjfloat/ocaml-ctypes,sjfloat/ocaml-ctypes,dsheets/ocaml-ctypes,fdopen/ocaml-ctypes,fdopen/ocaml-ctypes,whitequark/ocaml-ctypes,dsheets/ocaml-ctypes,ocamllabs/ocaml-ctypes,ocamllabs/ocaml-ctypes
d2ed7959a892af6dfe0fc07d772ee3e7bfc70235
src/systems/SimplePhysics.h
src/systems/SimplePhysics.h
#pragma once #include "../IFactory.h" #include "../ISystem.h" #include <string> #include <vector> #include <map> #include "../AABBTree.h" class Property; class IMoverComponent; class SimplePhysics : public Sigma::IFactory, public ISystem<IMoverComponent> { public: SimplePhysics() { } ~SimplePhysics() { }; /** * \brief Starts the Simple Physics system. * * \return bool Returns false on startup failure. */ bool Start() { } /** * \brief Causes an update in the system based on the change in time. * * Updates the state of the system based off how much time has elapsed since the last update. * \param[in] const float delta The change in time since the last update * \return bool Returns true if we had an update interval passed. */ bool Update(const double delta); std::map<std::string,FactoryFunction> getFactoryFunctions(); void createPhysicsMover(const unsigned int entityID, std::vector<Property> &properties) ; void createViewMover(const unsigned int entityID, std::vector<Property> &properties) ; void createAABBTree(const unsigned int entityID, std::vector<Property> &properties) ; private: std::map<unsigned int, Sigma::AABBTree*> colliders; };
#pragma once #include "../IFactory.h" #include "../ISystem.h" #include <string> #include <vector> #include <map> #include "../AABBTree.h" class Property; class IMoverComponent; class SimplePhysics : public Sigma::IFactory, public ISystem<IMoverComponent> { public: SimplePhysics() { } ~SimplePhysics() { }; /** * \brief Starts the Simple Physics system. * * \return bool Returns false on startup failure. */ bool Start() { } /** * \brief Causes an update in the system based on the change in time. * * Updates the state of the system based off how much time has elapsed since the last update. * \param[in] const float delta The change in time since the last update * \return bool Returns true if we had an update interval passed. */ bool Update(const double delta); std::map<std::string,FactoryFunction> getFactoryFunctions(); void createPhysicsMover(const unsigned int entityID, std::vector<Property> &properties) ; void createViewMover(const unsigned int entityID, std::vector<Property> &properties) ; void createAABBTree(const unsigned int entityID, std::vector<Property> &properties) ; Sigma::AABBTree* GetCollider(const unsigned int entityID) { if (this->colliders.find(entityID) != this->colliders.end()) { return this->colliders[entityID]; } return nullptr; } private: std::map<unsigned int, Sigma::AABBTree*> colliders; };
Add the ability to get Colliders from SImplePhysics
Add the ability to get Colliders from SImplePhysics
C
mit
adam4813/Sigma,adam4813/Sigma
218edbbeb90d26f3c1a3934b8eae931ac972b957
PWGCF/PWGCFChaoticityLinkDef.h
PWGCF/PWGCFChaoticityLinkDef.h
#pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliChaoticity+; #pragma link C++ class AliThreePionRadii+; #pragma link C++ class AliChaoticityEventCollection+; #pragma link C++ class AliChaoticityEventStruct+; #pragma link C++ class AliChaoticityTrackStruct+; #pragma link C++ class AliChaoticityMCStruct+; #pragma link C++ class AliChaoticityPairStruct+; #pragma link C++ class AliChaoticityNormPairStruct+;
#pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliChaoticity+; #pragma link C++ class AliThreePionRadii+; #pragma link C++ class AliChaoticityEventCollection+; #pragma link C++ class AliChaoticityEventStruct+; #pragma link C++ class AliChaoticityTrackStruct+; #pragma link C++ class AliChaoticityMCStruct+; #pragma link C++ class AliChaoticityPairStruct+; #pragma link C++ class AliChaoticityNormPairStruct+; #pragma link C++ class AliFourPion+; #pragma link C++ class AliFourPionEventCollection+; #pragma link C++ class AliFourPionEventStruct+; #pragma link C++ class AliFourPionTrackStruct+; #pragma link C++ class AliFourPionMCStruct+;
Update compile code for 4-pion analysis
Update compile code for 4-pion analysis
C
bsd-3-clause
alisw/AliPhysics,jmargutt/AliPhysics,btrzecia/AliPhysics,btrzecia/AliPhysics,victor-gonzalez/AliPhysics,amaringarcia/AliPhysics,akubera/AliPhysics,fcolamar/AliPhysics,lcunquei/AliPhysics,dstocco/AliPhysics,sebaleh/AliPhysics,mkrzewic/AliPhysics,mazimm/AliPhysics,mazimm/AliPhysics,akubera/AliPhysics,nschmidtALICE/AliPhysics,AMechler/AliPhysics,dmuhlhei/AliPhysics,sebaleh/AliPhysics,hzanoli/AliPhysics,mkrzewic/AliPhysics,jmargutt/AliPhysics,sebaleh/AliPhysics,mbjadhav/AliPhysics,hcab14/AliPhysics,aaniin/AliPhysics,dmuhlhei/AliPhysics,ppribeli/AliPhysics,mpuccio/AliPhysics,AMechler/AliPhysics,mbjadhav/AliPhysics,dlodato/AliPhysics,victor-gonzalez/AliPhysics,fcolamar/AliPhysics,preghenella/AliPhysics,amatyja/AliPhysics,fcolamar/AliPhysics,mazimm/AliPhysics,dlodato/AliPhysics,rihanphys/AliPhysics,ppribeli/AliPhysics,dmuhlhei/AliPhysics,mvala/AliPhysics,jmargutt/AliPhysics,yowatana/AliPhysics,btrzecia/AliPhysics,nschmidtALICE/AliPhysics,AMechler/AliPhysics,pchrista/AliPhysics,adriansev/AliPhysics,amaringarcia/AliPhysics,fbellini/AliPhysics,kreisl/AliPhysics,lcunquei/AliPhysics,AMechler/AliPhysics,kreisl/AliPhysics,fbellini/AliPhysics,victor-gonzalez/AliPhysics,hzanoli/AliPhysics,dlodato/AliPhysics,pbatzing/AliPhysics,alisw/AliPhysics,rbailhac/AliPhysics,AudreyFrancisco/AliPhysics,akubera/AliPhysics,pbuehler/AliPhysics,hcab14/AliPhysics,mvala/AliPhysics,mpuccio/AliPhysics,fcolamar/AliPhysics,adriansev/AliPhysics,ALICEHLT/AliPhysics,yowatana/AliPhysics,rbailhac/AliPhysics,preghenella/AliPhysics,lfeldkam/AliPhysics,alisw/AliPhysics,AudreyFrancisco/AliPhysics,pchrista/AliPhysics,pchrista/AliPhysics,hzanoli/AliPhysics,hcab14/AliPhysics,kreisl/AliPhysics,mazimm/AliPhysics,ppribeli/AliPhysics,nschmidtALICE/AliPhysics,jmargutt/AliPhysics,fcolamar/AliPhysics,lfeldkam/AliPhysics,AudreyFrancisco/AliPhysics,rderradi/AliPhysics,mpuccio/AliPhysics,dstocco/AliPhysics,mvala/AliPhysics,akubera/AliPhysics,mvala/AliPhysics,rihanphys/AliPhysics,dmuhlhei/AliPhysics,aaniin/AliPhysics,rderradi/AliPhysics,hcab14/AliPhysics,dstocco/AliPhysics,lfeldkam/AliPhysics,aaniin/AliPhysics,nschmidtALICE/AliPhysics,jmargutt/AliPhysics,dlodato/AliPhysics,sebaleh/AliPhysics,dstocco/AliPhysics,fcolamar/AliPhysics,rihanphys/AliPhysics,mkrzewic/AliPhysics,mvala/AliPhysics,ALICEHLT/AliPhysics,yowatana/AliPhysics,kreisl/AliPhysics,mkrzewic/AliPhysics,lcunquei/AliPhysics,SHornung1/AliPhysics,rbailhac/AliPhysics,jgronefe/AliPhysics,pbatzing/AliPhysics,carstooon/AliPhysics,jgronefe/AliPhysics,yowatana/AliPhysics,pbuehler/AliPhysics,ppribeli/AliPhysics,pbuehler/AliPhysics,lcunquei/AliPhysics,ALICEHLT/AliPhysics,AMechler/AliPhysics,jmargutt/AliPhysics,victor-gonzalez/AliPhysics,rbailhac/AliPhysics,rihanphys/AliPhysics,lcunquei/AliPhysics,SHornung1/AliPhysics,preghenella/AliPhysics,AudreyFrancisco/AliPhysics,aaniin/AliPhysics,sebaleh/AliPhysics,hcab14/AliPhysics,ALICEHLT/AliPhysics,rihanphys/AliPhysics,pbatzing/AliPhysics,pchrista/AliPhysics,amatyja/AliPhysics,aaniin/AliPhysics,akubera/AliPhysics,preghenella/AliPhysics,mvala/AliPhysics,amatyja/AliPhysics,victor-gonzalez/AliPhysics,hzanoli/AliPhysics,akubera/AliPhysics,preghenella/AliPhysics,aaniin/AliPhysics,amaringarcia/AliPhysics,mbjadhav/AliPhysics,rihanphys/AliPhysics,carstooon/AliPhysics,AMechler/AliPhysics,amaringarcia/AliPhysics,carstooon/AliPhysics,dlodato/AliPhysics,jgronefe/AliPhysics,adriansev/AliPhysics,SHornung1/AliPhysics,kreisl/AliPhysics,lcunquei/AliPhysics,nschmidtALICE/AliPhysics,preghenella/AliPhysics,dmuhlhei/AliPhysics,hzanoli/AliPhysics,carstooon/AliPhysics,adriansev/AliPhysics,pbatzing/AliPhysics,jgronefe/AliPhysics,dmuhlhei/AliPhysics,pbatzing/AliPhysics,adriansev/AliPhysics,rbailhac/AliPhysics,fbellini/AliPhysics,SHornung1/AliPhysics,dlodato/AliPhysics,lfeldkam/AliPhysics,AudreyFrancisco/AliPhysics,hcab14/AliPhysics,rderradi/AliPhysics,ALICEHLT/AliPhysics,rihanphys/AliPhysics,preghenella/AliPhysics,ppribeli/AliPhysics,jgronefe/AliPhysics,AudreyFrancisco/AliPhysics,adriansev/AliPhysics,hcab14/AliPhysics,lcunquei/AliPhysics,btrzecia/AliPhysics,btrzecia/AliPhysics,pbuehler/AliPhysics,mpuccio/AliPhysics,kreisl/AliPhysics,dmuhlhei/AliPhysics,fbellini/AliPhysics,dlodato/AliPhysics,mazimm/AliPhysics,kreisl/AliPhysics,victor-gonzalez/AliPhysics,pbuehler/AliPhysics,mpuccio/AliPhysics,yowatana/AliPhysics,pbuehler/AliPhysics,ppribeli/AliPhysics,SHornung1/AliPhysics,lfeldkam/AliPhysics,amatyja/AliPhysics,fbellini/AliPhysics,dstocco/AliPhysics,SHornung1/AliPhysics,mazimm/AliPhysics,sebaleh/AliPhysics,jmargutt/AliPhysics,carstooon/AliPhysics,amatyja/AliPhysics,mkrzewic/AliPhysics,mkrzewic/AliPhysics,ALICEHLT/AliPhysics,rderradi/AliPhysics,rderradi/AliPhysics,mpuccio/AliPhysics,carstooon/AliPhysics,alisw/AliPhysics,mazimm/AliPhysics,mkrzewic/AliPhysics,dstocco/AliPhysics,nschmidtALICE/AliPhysics,amaringarcia/AliPhysics,fbellini/AliPhysics,alisw/AliPhysics,ALICEHLT/AliPhysics,pchrista/AliPhysics,mbjadhav/AliPhysics,mbjadhav/AliPhysics,dstocco/AliPhysics,btrzecia/AliPhysics,pchrista/AliPhysics,pbatzing/AliPhysics,lfeldkam/AliPhysics,amatyja/AliPhysics,sebaleh/AliPhysics,AudreyFrancisco/AliPhysics,btrzecia/AliPhysics,carstooon/AliPhysics,yowatana/AliPhysics,alisw/AliPhysics,AMechler/AliPhysics,rbailhac/AliPhysics,pbatzing/AliPhysics,rbailhac/AliPhysics,mpuccio/AliPhysics,amaringarcia/AliPhysics,jgronefe/AliPhysics,fcolamar/AliPhysics,rderradi/AliPhysics,pbuehler/AliPhysics,nschmidtALICE/AliPhysics,amaringarcia/AliPhysics,mbjadhav/AliPhysics,alisw/AliPhysics,victor-gonzalez/AliPhysics,ppribeli/AliPhysics,jgronefe/AliPhysics,adriansev/AliPhysics,aaniin/AliPhysics,yowatana/AliPhysics,fbellini/AliPhysics,lfeldkam/AliPhysics,mbjadhav/AliPhysics,rderradi/AliPhysics,amatyja/AliPhysics,pchrista/AliPhysics,hzanoli/AliPhysics,mvala/AliPhysics,hzanoli/AliPhysics,SHornung1/AliPhysics,akubera/AliPhysics
ef7d0d8445f2f0953af9c87929e0a4d9859fa017
slave.h
slave.h
#include "modlib.h" #include "parser.h" #include "exception.h" //Types typedef struct { uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready uint8_t *Frame; //Response frame content } MODBUSResponseStatus; //Type containing information about frame that is set up at slave side typedef struct { uint8_t Address; uint16_t *Registers; uint16_t RegisterCount; MODBUSResponseStatus Response; } MODBUSSlaveStatus; //Type containing slave device configuration data //Variables definitions extern MODBUSSlaveStatus MODBUSSlave; //Slave configuration //Function prototypes extern void MODBUSParseRequest( uint8_t *, uint8_t ); //Parse and interpret given modbus frame on slave-side extern void MODBUSSlaveInit( uint8_t, uint16_t *, uint16_t ); //Very basic init of slave side
#include "modlib.h" #include "parser.h" #include "exception.h" //Types typedef struct { uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready uint8_t *Frame; //Response frame content } MODBUSResponseStatus; //Type containing information about frame that is set up at slave side typedef struct { uint8_t Address; uint16_t *Registers; uint16_t RegisterCount; MODBUSResponseStatus Response; } MODBUSSlaveStatus; //Type containing slave device configuration data //Variables definitions extern MODBUSSlaveStatus MODBUSSlave; //Slave configuration //Function prototypes extern void MODBUSException( uint8_t, uint8_t ); //Generate exception response to response frame buffer extern void MODBUSParseRequest( uint8_t *, uint8_t ); //Parse and interpret given modbus frame on slave-side extern void MODBUSSlaveInit( uint8_t, uint16_t *, uint16_t ); //Very basic init of slave side
Add prototype of MODBUSException function
Add prototype of MODBUSException function
C
mit
Jacajack/modlib
ed4932362d20af4c06610592b0a13016df4aad16
sys/posix/include/sys/bytes.h
sys/posix/include/sys/bytes.h
/* * Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de> * * 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 posix_sockets */ /** * @{ * * @file * @brief System-internal byte operations. * * @author Martine Lenders <mlenders@inf.fu-berlin.de> */ #ifndef SYS_BYTES_H #define SYS_BYTES_H #include <stddef.h> #include "byteorder.h" #ifdef __cplusplus extern "C" { #endif #ifndef __MACH__ typedef size_t socklen_t; /**< socket address length */ #else /* Defined for OSX with a different type */ typedef __darwin_socklen_t socklen_t; /**< socket address length */ #endif #ifdef __cplusplus } #endif #endif /* SYS_BYTES_H */ /** @} */
/* * Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de> * * 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 posix_sockets */ /** * @{ * * @file * @brief System-internal byte operations. * * @author Martine Lenders <mlenders@inf.fu-berlin.de> */ #ifndef SYS_BYTES_H #define SYS_BYTES_H #include <stddef.h> #include "byteorder.h" #ifdef __cplusplus extern "C" { #endif typedef size_t socklen_t; /**< socket address length */ #ifdef __cplusplus } #endif #endif /* SYS_BYTES_H */ /** @} */
Revert "posix/osx: fix type conflict on OSX native"
Revert "posix/osx: fix type conflict on OSX native" This reverts commit dcebfb11bc5a861c711e58838eec5b0131d020e2.
C
lgpl-2.1
OlegHahm/RIOT,yogo1212/RIOT,toonst/RIOT,toonst/RIOT,josephnoir/RIOT,mfrey/RIOT,rfuentess/RIOT,avmelnikoff/RIOT,BytesGalore/RIOT,x3ro/RIOT,lazytech-org/RIOT,A-Paul/RIOT,toonst/RIOT,rfuentess/RIOT,biboc/RIOT,kbumsik/RIOT,BytesGalore/RIOT,aeneby/RIOT,smlng/RIOT,yogo1212/RIOT,kbumsik/RIOT,cladmi/RIOT,smlng/RIOT,kYc0o/RIOT,lazytech-org/RIOT,OlegHahm/RIOT,neiljay/RIOT,miri64/RIOT,RIOT-OS/RIOT,aeneby/RIOT,BytesGalore/RIOT,RIOT-OS/RIOT,kaspar030/RIOT,authmillenon/RIOT,neiljay/RIOT,biboc/RIOT,gebart/RIOT,avmelnikoff/RIOT,basilfx/RIOT,x3ro/RIOT,kYc0o/RIOT,cladmi/RIOT,mfrey/RIOT,A-Paul/RIOT,kYc0o/RIOT,smlng/RIOT,authmillenon/RIOT,cladmi/RIOT,ant9000/RIOT,ant9000/RIOT,kaspar030/RIOT,ant9000/RIOT,mtausig/RIOT,kaspar030/RIOT,jasonatran/RIOT,OlegHahm/RIOT,BytesGalore/RIOT,cladmi/RIOT,RIOT-OS/RIOT,mfrey/RIOT,OTAkeys/RIOT,yogo1212/RIOT,toonst/RIOT,miri64/RIOT,RIOT-OS/RIOT,josephnoir/RIOT,gebart/RIOT,authmillenon/RIOT,avmelnikoff/RIOT,aeneby/RIOT,rfuentess/RIOT,gebart/RIOT,x3ro/RIOT,avmelnikoff/RIOT,A-Paul/RIOT,rfuentess/RIOT,gebart/RIOT,BytesGalore/RIOT,x3ro/RIOT,authmillenon/RIOT,neiljay/RIOT,yogo1212/RIOT,kbumsik/RIOT,OTAkeys/RIOT,basilfx/RIOT,OTAkeys/RIOT,kYc0o/RIOT,lazytech-org/RIOT,josephnoir/RIOT,kbumsik/RIOT,neiljay/RIOT,ant9000/RIOT,neiljay/RIOT,lazytech-org/RIOT,jasonatran/RIOT,rfuentess/RIOT,biboc/RIOT,josephnoir/RIOT,mfrey/RIOT,mtausig/RIOT,basilfx/RIOT,A-Paul/RIOT,basilfx/RIOT,aeneby/RIOT,kYc0o/RIOT,kaspar030/RIOT,OTAkeys/RIOT,toonst/RIOT,authmillenon/RIOT,miri64/RIOT,mfrey/RIOT,ant9000/RIOT,OlegHahm/RIOT,biboc/RIOT,aeneby/RIOT,x3ro/RIOT,miri64/RIOT,kaspar030/RIOT,yogo1212/RIOT,josephnoir/RIOT,jasonatran/RIOT,smlng/RIOT,biboc/RIOT,smlng/RIOT,kbumsik/RIOT,yogo1212/RIOT,cladmi/RIOT,mtausig/RIOT,jasonatran/RIOT,A-Paul/RIOT,mtausig/RIOT,RIOT-OS/RIOT,avmelnikoff/RIOT,authmillenon/RIOT,OTAkeys/RIOT,basilfx/RIOT,gebart/RIOT,OlegHahm/RIOT,jasonatran/RIOT,miri64/RIOT,mtausig/RIOT,lazytech-org/RIOT
d5e8df788f3d98034edc66090d33eaeaa3179d23
ext/fast_stack/fast_stack.c
ext/fast_stack/fast_stack.c
#include <stdio.h> #include <ruby.h> #include <ruby/encoding.h> static VALUE profiler_start(VALUE module, VALUE usec) { struct itimerval timer; timer.it_interval.tv_sec = 0; timer.it_interval.tv_usec = NUM2LONG(usec); timer.it_value = timer.it_interval; setitimer(ITIMER_PROF, &timer, 0); return Qnil; } static VALUE profiler_stop(VALUE module) { struct itimerval timer; memset(&timer, 0, sizeof(timer)); setitimer(ITIMER_PROF, &timer, 0); return Qnil; } static VALUE rb_profile_block(VALUE module, VALUE usec) { rb_need_block(); profiler_start(module, usec); rb_yield(Qundef); profiler_stop(module); return Qnil; } void Init_fast_stack( void ) { VALUE rb_mFastStack = rb_define_module("FastStack"); rb_define_module_function(rb_mFastStack, "profile_block", rb_profile_block, 1); }
#include <stdio.h> #include <sys/time.h> #include <ruby.h> #include <ruby/encoding.h> static VALUE profiler_start(VALUE module, VALUE usec) { struct itimerval timer; timer.it_interval.tv_sec = 0; timer.it_interval.tv_usec = NUM2LONG(usec); timer.it_value = timer.it_interval; setitimer(ITIMER_PROF, &timer, 0); return Qnil; } static VALUE profiler_stop(VALUE module) { struct itimerval timer; memset(&timer, 0, sizeof(timer)); setitimer(ITIMER_PROF, &timer, 0); return Qnil; } static VALUE rb_profile_block(VALUE module, VALUE usec) { rb_need_block(); profiler_start(module, usec); rb_yield(Qundef); profiler_stop(module); return Qnil; } void Init_fast_stack( void ) { VALUE rb_mFastStack = rb_define_module("FastStack"); rb_define_module_function(rb_mFastStack, "profile_block", rb_profile_block, 1); }
Fix "storage size of 'timer' isn't known" on Debian Squeeze
Fix "storage size of 'timer' isn't known" on Debian Squeeze struct itimerval defined in sys/time.h
C
mit
SamSaffron/fast_stack,joshuaflanagan/fast_stack,lowjoel/fast_stack,lowjoel/fast_stack,joshuaflanagan/fast_stack,SamSaffron/fast_stack
dece25be6d34c098514ada240a52e13b6c8946c1
common/sdp-dummy.c
common/sdp-dummy.c
/* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2005-2006 Marcel Holtmann <marcel@holtmann.org> * * * 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 * */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <errno.h> #include "logging.h" #include "sdp-xml.h" sdp_record_t *sdp_xml_parse_record(const char *data, int size) { error("No XML parser available"); return -1; }
/* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2005-2006 Marcel Holtmann <marcel@holtmann.org> * * * 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 * */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <errno.h> #include "logging.h" #include "sdp-xml.h" sdp_record_t *sdp_xml_parse_record(const char *data, int size) { error("No XML parser available"); return NULL; }
Return NULL in case of the dummy XML parser
Return NULL in case of the dummy XML parser
C
lgpl-2.1
pstglia/external-bluetooth-bluez,ComputeCycles/bluez,silent-snowman/bluez,pkarasev3/bluez,pkarasev3/bluez,mapfau/bluez,ComputeCycles/bluez,mapfau/bluez,mapfau/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,mapfau/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,pkarasev3/bluez,pkarasev3/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,silent-snowman/bluez