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
23db9892b5bdf8493b86ff5676d5cc29f17588ab
Modules/OpenViewCore/include/QVTKFramebufferObjectRenderer.h
Modules/OpenViewCore/include/QVTKFramebufferObjectRenderer.h
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __QVTKFramebufferObjectRenderer_h #define __QVTKFramebufferObjectRenderer_h #include <QQuickFramebufferObject> #include "QVTKQuickItem.h" #include <MitkOpenViewCoreExports.h> class vtkInternalOpenGLRenderWindow; //! Part of Qml rendering prototype, see QmlMitkRenderWindowItem. class MITKOPENVIEWCORE_EXPORT QVTKFramebufferObjectRenderer : public QQuickFramebufferObject::Renderer { public: bool m_neverRendered; bool m_readyToRender; vtkInternalOpenGLRenderWindow *m_vtkRenderWindow; QVTKQuickItem *m_vtkQuickItem; public: QVTKFramebufferObjectRenderer(vtkInternalOpenGLRenderWindow *rw); ~QVTKFramebufferObjectRenderer(); virtual void synchronize(QQuickFramebufferObject * item); virtual void render(); QOpenGLFramebufferObject *createFramebufferObject(const QSize &size); friend class vtkInternalOpenGLRenderWindow; }; #endif
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __QVTKFramebufferObjectRenderer_h #define __QVTKFramebufferObjectRenderer_h #include <QQuickFramebufferObject> #include "QVTKQuickItem.h" #include <MitkOpenViewCoreExports.h> class vtkInternalOpenGLRenderWindow; //! Part of Qml rendering prototype, see QmlMitkRenderWindowItem. class MITKOPENVIEWCORE_EXPORT QVTKFramebufferObjectRenderer : public QQuickFramebufferObject::Renderer { public: vtkInternalOpenGLRenderWindow *m_vtkRenderWindow; bool m_neverRendered; bool m_readyToRender; QVTKQuickItem *m_vtkQuickItem; public: QVTKFramebufferObjectRenderer(vtkInternalOpenGLRenderWindow *rw); ~QVTKFramebufferObjectRenderer(); virtual void synchronize(QQuickFramebufferObject * item); virtual void render(); QOpenGLFramebufferObject *createFramebufferObject(const QSize &size); friend class vtkInternalOpenGLRenderWindow; }; #endif
Fix warnings in OpenViewCore module
Fix warnings in OpenViewCore module
C
bsd-3-clause
MITK/MITK,fmilano/mitk,MITK/MITK,fmilano/mitk,fmilano/mitk,fmilano/mitk,MITK/MITK,MITK/MITK,fmilano/mitk,fmilano/mitk,MITK/MITK,fmilano/mitk,MITK/MITK
adb4b9f67da9152584a958671ad8aac2aad28f0f
PG/app/AppConfiguration.h
PG/app/AppConfiguration.h
#pragma once #include "PG/app/StyleSheet.h" #include "PG/core/Size.h" #include <string> namespace PG { //-------------------------------------------------------- struct AppConfiguration { std::string windowTitle; Size windowSize; int tileSize = 32; std::string resourcesFilename; StyleSheet styleSheet; }; }
#pragma once #include "PG/app/StyleSheet.h" #include "PG/core/Size.h" #include <string> namespace PG { //-------------------------------------------------------- struct AppConfiguration { std::string windowTitle; Size windowSize; int tileSize = 32; StyleSheet styleSheet; }; }
Remove resourcesFilename as it's not required
Remove resourcesFilename as it's not required
C
mit
mcdreamer/PG,mcdreamer/PG
e808ebf62fcc63e1c21f9931ffec021604043d35
libyaul/scu/bus/cpu/cpu.h
libyaul/scu/bus/cpu/cpu.h
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #ifndef _CPU_H_ #define _CPU_H_ #include <cpu/cache.h> #include <cpu/divu.h> #include <cpu/dmac.h> #include <cpu/dual.h> #include <cpu/endian.h> #include <cpu/frt.h> #include <cpu/instructions.h> #include <cpu/intc.h> #include <cpu/registers.h> #include <cpu/sync.h> #include <cpu/wdt.h> #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern void cpu_init(void); extern void _slave_polling_entry(void); extern void _slave_ici_entry(void); extern void _exception_illegal_instruction(void); extern void _exception_illegal_slot(void); extern void _exception_cpu_address_error(void); extern void _exception_dma_address_error(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !_CPU_H_ */
/* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #ifndef _CPU_H_ #define _CPU_H_ #include <cpu/cache.h> #include <cpu/divu.h> #include <cpu/dmac.h> #include <cpu/dual.h> #include <cpu/endian.h> #include <cpu/frt.h> #include <cpu/instructions.h> #include <cpu/intc.h> #include <cpu/registers.h> #include <cpu/sync.h> #include <cpu/wdt.h> #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern void cpu_init(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !_CPU_H_ */
Remove prototypes for static methods
Remove prototypes for static methods
C
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
11782c7860ced878fed5db2d68d8c8fe3bdfdd1d
2018/clone/clone-vm-sample.c
2018/clone/clone-vm-sample.c
#define _GNU_SOURCE #include <sched.h> #include <sys/syscall.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> static int child_func(void* arg) { return 0; } int main(int argc, char** argv) { // Stack for child. const int STACK_SIZE = 65536; char* stack = malloc(STACK_SIZE); if (!stack) { perror("malloc"); exit(1); } unsigned long flags = 0; if (clone(child_func, stack + STACK_SIZE, flags | SIGCHLD, NULL) == -1) { perror("clone"); exit(1); } int status; pid_t pid = waitpid(-1, &status, 0); if (pid == -1) { perror("waitpid"); exit(1); } printf(" Child PID=%ld\n", (long)pid); return 0; }
#define _GNU_SOURCE #include <sched.h> #include <sys/syscall.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> static int child_func(void* arg) { char* buf = (char*)arg; strcpy(buf, "hello"); return 0; } int main(int argc, char** argv) { // Stack for child. const int STACK_SIZE = 65536; char* stack = malloc(STACK_SIZE); if (!stack) { perror("malloc"); exit(1); } unsigned long flags = 0; if (argc > 1 && !strcmp(argv[1], "vm")) { flags |= CLONE_VM; } char buf[100] = {0}; if (clone(child_func, stack + STACK_SIZE, flags | SIGCHLD, buf) == -1) { perror("clone"); exit(1); } int status; pid_t pid = waitpid(-1, &status, 0); if (pid == -1) { perror("waitpid"); exit(1); } printf("Child exited. buf = \"%s\"\n", buf); return 0; }
Clone with/without VM sample working now
Clone with/without VM sample working now
C
unlicense
eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog
a835e62e608714541135f90a26f46e919e3e52aa
2018/clone/clone-vm-sample.c
2018/clone/clone-vm-sample.c
// We have to define the _GNU_SOURCE to get access to clone(2) and the CLONE_* // flags from sched.h #define _GNU_SOURCE #include <sched.h> #include <sys/syscall.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> static int child_func(void* arg) { char* buf = (char*)arg; strcpy(buf, "hello"); return 0; } int main(int argc, char** argv) { // Allocate stack for child task. const int STACK_SIZE = 65536; char* stack = malloc(STACK_SIZE); if (!stack) { perror("malloc"); exit(1); } // When called with the command-line argument "vm", set the CLONE_VM flag on. unsigned long flags = 0; if (argc > 1 && !strcmp(argv[1], "vm")) { flags |= CLONE_VM; } char buf[100] = {0}; if (clone(child_func, stack + STACK_SIZE, flags | SIGCHLD, buf) == -1) { perror("clone"); exit(1); } int status; if (wait(&status) == -1) { perror("wait"); exit(1); } printf("Child exited with status %d. buf = \"%s\"\n", status, buf); return 0; }
// We have to define the _GNU_SOURCE to get access to clone(2) and the CLONE_* // flags from sched.h #define _GNU_SOURCE #include <sched.h> #include <sys/syscall.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> static int child_func(void* arg) { char* buf = (char*)arg; printf("Child sees buf = \"%s\"\n", buf); strcpy(buf, "hello from child"); return 0; } int main(int argc, char** argv) { // Allocate stack for child task. const int STACK_SIZE = 65536; char* stack = malloc(STACK_SIZE); if (!stack) { perror("malloc"); exit(1); } // When called with the command-line argument "vm", set the CLONE_VM flag on. unsigned long flags = 0; if (argc > 1 && !strcmp(argv[1], "vm")) { flags |= CLONE_VM; } char buf[100]; strcpy(buf, "hello from parent"); if (clone(child_func, stack + STACK_SIZE, flags | SIGCHLD, buf) == -1) { perror("clone"); exit(1); } int status; if (wait(&status) == -1) { perror("wait"); exit(1); } printf("Child exited with status %d. buf = \"%s\"\n", status, buf); return 0; }
Change the sample to pass message from parent as well
Change the sample to pass message from parent as well
C
unlicense
eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog
4f515b1847d32452f9c0abbc5325eeb3ac94b7e2
tensorflow/lite/kernels/internal/reference/integer_ops/lut.h
tensorflow/lite/kernels/internal/reference/integer_ops/lut.h
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_ #define TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_ #include "tensorflow/lite/kernels/internal/common.h" namespace tflite { namespace reference_integer_ops { template <typename InputT, typename OutputT> inline void LookupTable(const InputT* input_data, int num_elements, const OutputT* lut, OutputT* output_data) { for (int i = 0; i < num_elements; i++) { output_data[i] = LUTLookup(input_data[i], lut); } } } // namespace reference_integer_ops } // namespace tflite #endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_ #define TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_ #include "tensorflow/lite/kernels/internal/common.h" namespace tflite { namespace reference_integer_ops { template <typename InputT, typename OutputT> inline void LookupTable(const InputT* input_data, int num_elements, const OutputT* lut, OutputT* output_data) { for (int i = 0; i < num_elements; ++i) { output_data[i] = LUTLookup(input_data[i], lut); } } } // namespace reference_integer_ops } // namespace tflite #endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_
Use ++i instead of i++
Use ++i instead of i++
C
apache-2.0
tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,yongtang/tensorflow,karllessard/tensorflow
2f2658506c4d344daa40dce57e69ca2e209ed99a
include/core/SkMilestone.h
include/core/SkMilestone.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 86 #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 87 #endif
Update Skia milestone to 87
Update Skia milestone to 87 Change-Id: Ic755236e56a0b8064c5539c0a483fffbd4d9f334 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/312156 Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
C
bsd-3-clause
google/skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia
7af5ca84a6606374928cb5f2e15e14fff686fc63
lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.h
lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.h
//===- lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.h ---------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// /// /// \file /// \brief Declares the relocation processing pass for x86-64. This includes /// GOT and PLT entries, TLS, COPY, and ifunc. /// //===----------------------------------------------------------------------===// #ifndef LLD_READER_WRITER_ELF_AARCH64_AARCH64_RELOCATION_PASS_H #define LLD_READER_WRITER_ELF_AARCH64_AARCH64_RELOCATION_PASS_H #include <memory> namespace lld { class Pass; namespace elf { class AArch64LinkingContext; /// \brief Create AArch64 relocation pass for the given linking context. std::unique_ptr<Pass> createAArch64RelocationPass(const AArch64LinkingContext &); } } #endif
//===- lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.h ---------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// /// /// \file /// \brief Declares the relocation processing pass for AArch64. This includes /// GOT and PLT entries, TLS, COPY, and ifunc. /// //===----------------------------------------------------------------------===// #ifndef LLD_READER_WRITER_ELF_AARCH64_AARCH64_RELOCATION_PASS_H #define LLD_READER_WRITER_ELF_AARCH64_AARCH64_RELOCATION_PASS_H #include <memory> namespace lld { class Pass; namespace elf { class AArch64LinkingContext; /// \brief Create AArch64 relocation pass for the given linking context. std::unique_ptr<Pass> createAArch64RelocationPass(const AArch64LinkingContext &); } } #endif
Fix comment in AArch64 ELF backend
Fix comment in AArch64 ELF backend git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@222814 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/lld,llvm-mirror/lld
f687a87560979bec5f7fc58f79e47baacb70cc25
FABOperation/FABAsyncOperation.h
FABOperation/FABAsyncOperation.h
// // FABAsyncOperation.h // FABOperation // // Copyright © 2016 Twitter. All rights reserved. // #import <Foundation/Foundation.h> /** * Completion block that can be called in your subclass implementation. It is up to you when you want to call it. */ typedef void(^FABAsyncOperationCompletionBlock)(NSError *__nullable error); /** * FABAsyncOperation is a subclass of NSOperation that allows for asynchronous work to be performed, for things like networking, IPC or UI-driven logic. Create your own subclasses to encapsulate custom logic. * @warning When subclassing to create your own operations, be sure to call -[markDone] at some point, or program execution will hang. * @see -[markDone] in FABAsyncOperation_Private.h */ @interface FABAsyncOperation : NSOperation /** * Add a callback method for consumers of your subclasses to set when the asynchronous work is marked as complete with -[markDone]. */ @property (copy, nonatomic, nullable) FABAsyncOperationCompletionBlock asyncCompletion; @end
// // FABAsyncOperation.h // FABOperation // // Copyright © 2016 Twitter. All rights reserved. // #import <Foundation/Foundation.h> /** * Completion block that can be called in your subclass implementation. It is up to you when you want to call it. */ typedef void(^FABAsyncOperationCompletionBlock)(NSError *__nullable error); /** * FABAsyncOperation is a subclass of NSOperation that allows for asynchronous work to be performed, for things like networking, IPC or UI-driven logic. Create your own subclasses to encapsulate custom logic. * @warning When subclassing to create your own operations, be sure to call -[finishWithError:] at some point, or program execution will hang. * @see -[finishWithError:] in FABAsyncOperation_Private.h */ @interface FABAsyncOperation : NSOperation /** * Add a callback method for consumers of your subclasses to set when the asynchronous work is marked as complete with -[finishWithError:]. */ @property (copy, nonatomic, nullable) FABAsyncOperationCompletionBlock asyncCompletion; @end
Update comments to refer to finishWithError
Update comments to refer to finishWithError markDone was renamed to finishWithError
C
mit
google-fabric/FABOperation,twitter-fabric/FABOperation,google-fabric/FABOperation,twitter-fabric/FABOperation
b929a1e2a5a963272516b620382684472d2d7a95
arduino/OpenROV/AConfig.h
arduino/OpenROV/AConfig.h
#ifndef __ACONFIG_H_ #define __ACONFIG_H_ /* This must be before alphabetically before all other files that reference these settings for the compiler to work * or you may get vtable errors. */ /* This section is for devices and their configuration. IF you have not setup you pins with the * standard configuration of the OpenROV kits, you should probably clone the cape or controlboard * and change the pin definitions there. Things not wired to specific pins but on the I2C bus will * have the address defined in this file. */ //Kit: #define HAS_STD_CAPE (0) #define HAS_STD_PILOT (1) #define HAS_OROV_CONTROLLERBOARD_25 (0) #define HAS_STD_LIGHTS (1) #define HAS_STD_CALIBRATIONLASERS (0) #define HAS_STD_2X1_THRUSTERS (1) #define HAS_STD_CAMERAMOUNT (1) //After Market: #define HAS_POLOLU_MINIMUV (0) #define HAS_MS5803_14BA (0) #define MS5803_14BA_I2C_ADDRESS 0x76 #define HAS_MPU9150 (0) #define MPU9150_EEPROM_START 2 #endif
#ifndef __ACONFIG_H_ #define __ACONFIG_H_ /* This must be before alphabetically before all other files that reference these settings for the compiler to work * or you may get vtable errors. */ /* This section is for devices and their configuration. IF you have not setup you pins with the * standard configuration of the OpenROV kits, you should probably clone the cape or controlboard * and change the pin definitions there. Things not wired to specific pins but on the I2C bus will * have the address defined in this file. */ //Kit: #define HAS_STD_PILOT (1) /* The definitions are done in th #define HAS_STD_CAPE (0) #define HAS_OROV_CONTROLLERBOARD_25 (0) */ #include "BoardConfig.h" #define HAS_STD_LIGHTS (1) #define HAS_STD_CALIBRATIONLASERS (1) #define HAS_STD_2X1_THRUSTERS (1) #define HAS_STD_CAMERAMOUNT (1) //After Market: #define HAS_POLOLU_MINIMUV (0) #define HAS_MS5803_14BA (0) #define MS5803_14BA_I2C_ADDRESS 0x76 #define HAS_MPU9150 (0) #define MPU9150_EEPROM_START 2 #endif
Add automation for arduino board selection for compilation
Add automation for arduino board selection for compilation
C
mit
codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software
bf562de155364372c4dd93c5471e4a709c52f7e7
include/core/SkMilestone.h
include/core/SkMilestone.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 89 #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 90 #endif
Update Skia milestone to 90
Update Skia milestone to 90 Change-Id: Ib4ef9057cb623b2d8ea57c40fb6f67ac731471f0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353778 Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
C
bsd-3-clause
aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia
94b6cc19ea03b5fdcdb25e0e3663b663509757e4
jobs/AsyncLog.c
jobs/AsyncLog.c
// // AsyncLog.c // Ctest // // Created by Yanjiu Huang on 3/24/14. // Copyright (c) 2014 Yanjiu Huang. All rights reserved. // #include <stdio.h> #include "AsyncLog.h" void async_log_error(const char* format,...){ } void async_log_debug(const char* format,...){ } void async_log_info(const char* format,...){ }
// // AsyncLog.c // Ctest // // Created by Yanjiu Huang on 3/24/14. // Copyright (c) 2014 Yanjiu Huang. All rights reserved. // #include <stdio.h> #include <stdarg.h> #include "AsyncLog.h" void async_log_error(const char* format, ...){ va_list arg; va_start(arg, format); vfprintf(stderr, format, arg); va_end(arg); } void async_log_debug(const char* format, ...){ va_list arg; va_start(arg, format); vfprintf(stdout, format, arg); va_end(arg); } void async_log_info(const char* format, ...){ va_list arg; va_start(arg, format); vfprintf(stdout, format, arg); va_end(arg); }
Add the Async Log implementation
Add the Async Log implementation
C
mit
yanjiuhuang/AsyncTalk,yanjiuhuang/AsyncTalk
074f128cb1a27348516a8820f4bd079bac4d6ac3
blogposting_p.h
blogposting_p.h
/* This file is part of the kblog library. Copyright (c) 2007 Christian Weilbach <christian_weilbach@web.de> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef BLOGPOSTING_P_H #define BLOGPOSTING_P_H #include "blogposting.h" #include <KDateTime> #include <QStringList> namespace KBlog{ class BlogPostingPrivate { public: friend class Blog; bool mPublished; BlogPosting *q_ptr; QString mPostingId; QString mTitle; QString mContent; QStringList mCategories; QString mError; BlogPosting::Status mStatus; KDateTime mCreationDateTime; KDateTime mModificationDateTime; Q_DECLARE_PUBLIC(BlogPosting); }; } // namespace #endif
/* This file is part of the kblog library. Copyright (c) 2007 Christian Weilbach <christian_weilbach@web.de> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef BLOGPOSTING_P_H #define BLOGPOSTING_P_H #include "blogposting.h" #include <KDateTime> #include <QStringList> namespace KBlog{ class BlogPostingPrivate { public: friend class Blog; bool mPublished; BlogPosting *q_ptr; QString mPostingId; QString mTitle; QString mContent; QStringList mCategories; QString mError; BlogPosting::Status mStatus; KDateTime mCreationDateTime; KDateTime mModificationDateTime; Q_DECLARE_PUBLIC(BlogPosting) }; } // namespace #endif
Fix extra semicolor causing build failure
Fix extra semicolor causing build failure svn path=/trunk/KDE/kdepimlibs/; revision=694789
C
lgpl-2.1
KDE/kblog,KDE/kblog
3fa6e944890353f7937fab4c04d4e4fd1ac77fdc
ui/base/ime/character_composer.h
ui/base/ime/character_composer.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_BASE_IME_CHARACTER_COMPOSER_H_ #define UI_BASE_IME_CHARACTER_COMPOSER_H_ #pragma once #include <vector> #include "base/basictypes.h" #include "base/string_util.h" namespace ui { // A class to recognize compose and dead key sequence. // Outputs composed character. // // TODO(hashimoto): support unicode character composition starting with // Ctrl-Shift-U. http://crosbug.com/15925 class CharacterComposer { public: CharacterComposer(); ~CharacterComposer(); void Reset(); // Filters keypress. // Returns true if the keypress is recognized as a part of composition // sequence. bool FilterKeyPress(unsigned int keycode); // Returns a string consisting of composed character. // Empty string is returned when there is no composition result. const string16& composed_character() const { return composed_character_; } private: // Remembers keypresses previously filtered. std::vector<unsigned int> compose_buffer_; // A string representing the composed character. string16 composed_character_; DISALLOW_COPY_AND_ASSIGN(CharacterComposer); }; } // namespace ui #endif // UI_BASE_IME_CHARACTER_COMPOSER_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_BASE_IME_CHARACTER_COMPOSER_H_ #define UI_BASE_IME_CHARACTER_COMPOSER_H_ #pragma once #include <vector> #include "base/basictypes.h" #include "base/string_util.h" #include "ui/base/ui_export.h" namespace ui { // A class to recognize compose and dead key sequence. // Outputs composed character. // // TODO(hashimoto): support unicode character composition starting with // Ctrl-Shift-U. http://crosbug.com/15925 class UI_EXPORT CharacterComposer { public: CharacterComposer(); ~CharacterComposer(); void Reset(); // Filters keypress. // Returns true if the keypress is recognized as a part of composition // sequence. bool FilterKeyPress(unsigned int keycode); // Returns a string consisting of composed character. // Empty string is returned when there is no composition result. const string16& composed_character() const { return composed_character_; } private: // Remembers keypresses previously filtered. std::vector<unsigned int> compose_buffer_; // A string representing the composed character. string16 composed_character_; DISALLOW_COPY_AND_ASSIGN(CharacterComposer); }; } // namespace ui #endif // UI_BASE_IME_CHARACTER_COMPOSER_H_
Fix link error when component=shared_library is set
Fix link error when component=shared_library is set BUG=103789 TEST=Manual Review URL: http://codereview.chromium.org/8515013 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@109554 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,adobe/chromium
18ea3bfa8059ab859a758a65fd006327f1da31fd
boards/posix/nrf52_bsim/cmdline.h
boards/posix/nrf52_bsim/cmdline.h
/* * Copyright (c) 2019 Oticon A/S * * SPDX-License-Identifier: Apache-2.0 */ /** * This header exists solely to allow drivers meant for the native_posix board * to be used directly in the nrf52_bsim board. * Note that such reuse should be done with great care. * * The command line arguments parsing logic from native_posix was born as a copy * of the one from the BabbleSim's libUtil library * They are therefore mostly equal except for types and functions names. * * This header converts these so the native_posix call to dynamically register * command line arguments is passed to the nrf52_bsim one */ #include "../native_posix/cmdline_common.h" static inline void native_add_command_line_opts(struct args_struct_t *args) { void bs_add_extra_dynargs(struct args_struct_t *args); bs_add_extra_dynargs(args); }
/* * Copyright (c) 2019 Oticon A/S * * SPDX-License-Identifier: Apache-2.0 */ /** * This header exists solely to allow drivers meant for the native_posix board * to be used directly in the nrf52_bsim board. * Note that such reuse should be done with great care. * * The command line arguments parsing logic from native_posix was born as a copy * of the one from the BabbleSim's libUtil library * They are therefore mostly equal except for types and functions names. * * This header converts these so the native_posix call to dynamically register * command line arguments is passed to the nrf52_bsim one */ #ifndef BOARDS_POSIX_NRF52_BSIM_CMDLINE_H #define BOARDS_POSIX_NRF52_BSIM_CMDLINE_H #include "../native_posix/cmdline_common.h" #ifdef __cplusplus extern "C" { #endif static inline void native_add_command_line_opts(struct args_struct_t *args) { void bs_add_extra_dynargs(struct args_struct_t *args); bs_add_extra_dynargs(args); } #ifdef __cplusplus } #endif #endif /* BOARDS_POSIX_NRF52_BSIM_CMDLINE_H */
Add missing header guard and extern C block
nrf52_bsim: Add missing header guard and extern C block Add a missing header guard and an extern "C" block in one of the nrf52_bsim headers Signed-off-by: Alberto Escolar Piedras <52be3174920ed06cbdfbcf9622a1a6c68e942617@oticon.com>
C
apache-2.0
nashif/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,Vudentz/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,finikorg/zephyr,Vudentz/zephyr,nashif/zephyr,galak/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,galak/zephyr
6446caf75a12bccdfc9b1af81586a1340b968db4
Atomic/Atomic.h
Atomic/Atomic.h
// // Atomic.h // Atomic // // Created by Adlai Holler on 12/5/15. // Copyright © 2015 Adlai Holler. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for Atomic. FOUNDATION_EXPORT double AtomicVersionNumber; //! Project version string for Atomic. FOUNDATION_EXPORT const unsigned char AtomicVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <Atomic/PublicHeader.h>
// // Atomic.h // Atomic // // Created by Adlai Holler on 12/5/15. // Copyright © 2015 Adlai Holler. All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for Atomic. FOUNDATION_EXPORT double AtomicVersionNumber; //! Project version string for Atomic. FOUNDATION_EXPORT const unsigned char AtomicVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <Atomic/PublicHeader.h>
Remove silly import of UIKit
Remove silly import of UIKit
C
mit
Adlai-Holler/Atomic,Adlai-Holler/Atomic
15585314e9802d0c9d341fb9a6b396fd6520e8d4
tests/regression/28-race_reach/36-indirect_racefree.c
tests/regression/28-race_reach/36-indirect_racefree.c
#include <pthread.h> #include "racemacros.h" int g; int *g1; int *g2; pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&mutex); access(*g1); pthread_mutex_lock(&mutex); return NULL; } int main(void) { g1 = g2 = &g; create_threads(t); assert_racefree(*g2); // UNKNOWN join_threads(t); return 0; }
#include <pthread.h> #include "racemacros.h" int g; int *g1; int *g2; pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&mutex); access(*g1); pthread_mutex_lock(&mutex); return NULL; } int main(void) { g1 = g2 = &g; create_threads(t); pthread_mutex_lock(&mutex); assert_racefree(*g2); pthread_mutex_lock(&mutex); join_threads(t); return 0; }
Fix 28/36 to actually be race free
Fix 28/36 to actually be race free It was the same as 28/37.
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
a863c597d08a689be2103b67bc254ff749091fb9
fw/new/libs/AdapterBoard/AdapterBoard.c
fw/new/libs/AdapterBoard/AdapterBoard.c
#ifndef ADAPTERBOARD_H #define ADAPTERBOARD_H #include <RGBLed.h> #define LED_R 13 #define LED_G 9 #define LED_B 10 #define BACKLIGHT_PIN 0 class AdapterBoard { public: AdapterBoard(); void init(); void poll(); private: RGBLed led; Backlight backlight; }; #endif
#ifndef ADAPTERBOARD_H #define ADAPTERBOARD_H #include <RGBLed.h> #define LED_R 13 #define LED_G 9 #define LED_B 10 #define BACKLIGHT_PIN 11 #define SW_ON 4 #define SW_UP 12 #define SW_DOWN 6 class AdapterBoard { public: AdapterBoard(); void init(); void poll(); private: RGBLed led; Backlight backlight; }; #endif
Add switch pin definitions, fix pin for backlight
Add switch pin definitions, fix pin for backlight
C
bsd-3-clause
OSCARAdapter/OSCAR,OSCARAdapter/OSCAR
4ae24681241a740719a370ade51d0cfa4608dbb8
apps/c_blinky/main.c
apps/c_blinky/main.c
#include <firestorm.h> #include <gpio.h> #define LED_1 1 void main(void) { gpio_enable_output(LED_0); gpio_enable_output(LED_1); while(1) { gpio_set(LED_0); gpio_clear(LED_1); delay_ms(500); gpio_set(LED_1); gpio_clear(LED_0); delay_ms(500); } }
#include <firestorm.h> #include <gpio.h> #define LED_1 1 /* Delay for for the given microseconds (approximately). * * For a 16 MHz CPU, 1us == 16 instructions (assuming each instruction takes * one cycle). */ static void busy_delay_us(int duration) { // The inner loop instructions are: 14 NOPs + 1 SUBS/ADDS + 1 CMP while (duration-- != 0) { __asm volatile ( "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" "nop\n" ); } } /* Delay for for the given milliseconds (approximately). * * Note that this is not precise as there are 2 extra instructions on the inner * loop. Therefore, there is 1us added every 8 iterations. */ static void busy_delay_ms(int duration) { while (duration-- != 0) { busy_delay_us(1000); } } void main(void) { gpio_enable_output(LED_0); gpio_enable_output(LED_1); while(1) { gpio_set(LED_0); gpio_clear(LED_1); busy_delay_ms(500); gpio_set(LED_1); gpio_clear(LED_0); busy_delay_ms(500); } }
Use a "busy" delay function for blinky
WORKAROUND: Use a "busy" delay function for blinky While the timer support is not fixed, use a delay function the keeps the CPU busy using a certain amount of NOPs.
C
apache-2.0
google/tock-on-titan,google/tock-on-titan,google/tock-on-titan
c4589974f09becf2c271e03153fe5e47709186a5
include/matrix_access_impl.h
include/matrix_access_impl.h
//----------------------------------------------------------------------------- // Element Access //----------------------------------------------------------------------------- template<class T> T& matrix<T>::at( std::size_t row, std::size_t col ){ return data_.at(row*cols_+col); } template<class T> const T& matrix<T>::at( std::size_t row, std::size_t col ) const{ return data_.at(row*cols_+col); } template<class T> typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ){ return 0; } template<class T> const typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ) const{ return 0; }
//----------------------------------------------------------------------------- // Element Access //----------------------------------------------------------------------------- template<class T> T& matrix<T>::at( std::size_t row, std::size_t col ){ // TODO throw if out of bounds return data_.at(row*cols_+col); } template<class T> const T& matrix<T>::at( std::size_t row, std::size_t col ) const{ // TODO throw if out of bounds return data_.at(row*cols_+col); } template<class T> typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ){ return 0; } template<class T> const typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ) const{ return 0; }
Add todo comment on at() functions.
Add todo comment on at() functions.
C
mit
actinium/cppMatrix,actinium/cppMatrix
52e1beb3dfe634b6e05cd28e480fce984ba36141
bst.c
bst.c
#include "bst.h" static void BST_Transplant(BST* T, BSTNode* u, BSTNode* v); struct BSTNode { BSTNode* left; BSTNode* right; BSTNode* p; void* k; }; struct BST { BSTNode* root; }; BST* BST_Create(void) { BST* T = (BST* )malloc(sizeof(BST)); T->root = NULL; return T; } BSTNode* BSTNode_Create(void* k) { BSTNode* n = (BSTNode* )malloc(sizeof(BSTNode)); n->left = NULL; n->right = NULL; n->p = NULL; n->k = k; }
#include "bst.h" static void BST_Transplant(BST* T, BSTNode* u, BSTNode* v); struct BSTNode { BSTNode* left; BSTNode* right; BSTNode* p; void* k; }; struct BST { BSTNode* root; }; BST* BST_Create(void) { BST* T = (BST* )malloc(sizeof(BST)); T->root = NULL; return T; } BSTNode* BSTNode_Create(void* k) { BSTNode* n = (BSTNode* )malloc(sizeof(BSTNode)); n->left = NULL; n->right = NULL; n->p = NULL; n->k = k; } void BST_Inorder_Tree_Walk(BSTNode* n, void (f)(void*)) { if (n != NULL) { BST_Inorder_Tree_Walk(n->left, f); f(n->k); BST_Inorder_Tree_Walk(n->right, f); } }
Add BST inorder traversal function implementation
Add BST inorder traversal function implementation
C
mit
MaxLikelihood/CADT
0ce4e4a4d016a671fafd162852530e7c768b9a6c
dir.c
dir.c
#include <dirent.h> #include <stdio.h> #include <stdlib.h> #include <string.h> static char *dircat(char *d1, char *d2) { char *new = malloc(strlen(d1) + strlen(d2) + 2); sprintf(new, "%s/%s", d1, d2); return new; } void dirwalk(char *name, void (*func)(char *, void *), void *ctx) { DIR *dir = opendir(name); struct dirent *d; func(name, ctx); readdir(dir); readdir(dir); /* Ignore "." and ".." */ while ((d = readdir(dir)) != NULL) { if (d->d_type == DT_DIR && d->d_name[0] != '.') { char *nextdir = dircat(name, d->d_name); dirwalk(nextdir, func, ctx); free(nextdir); } } closedir(dir); }
#include <dirent.h> #include <stdio.h> #include <stdlib.h> #include <string.h> static char *dircat(char *d1, char *d2) { char *new = malloc(strlen(d1) + strlen(d2) + 2); sprintf(new, "%s/%s", d1, d2); return new; } void dirwalk(char *name, void (*func)(char *, void *), void *ctx) { DIR *dir = opendir(name); struct dirent *d; func(name, ctx); while ((d = readdir(dir)) != NULL) { if (d->d_type == DT_DIR && d->d_name[0] != '.') { char *nextdir = dircat(name, d->d_name); dirwalk(nextdir, func, ctx); free(nextdir); } } closedir(dir); }
Fix bug with . and ..
Fix bug with . and ..
C
mit
akojo/quickfind
371fd15fa3e58cda2f575d443d5c9cd06551821f
src/xedgewarp.c
src/xedgewarp.c
// vim:ts=4:sw=4:expandtab #include <stdlib.h> #include <stdio.h> #include "randr.h" #include "types.h" #include "globals.h" int main(void) { // TODO }
// vim:ts=4:sw=4:expandtab #include <stdlib.h> #include <stdio.h> #include <err.h> #include <xcb/xcb.h> #include <xcb/xcb_aux.h> #include "randr.h" #include "types.h" #include "globals.h" xcb_connection_t *connection; xcb_window_t root; static void initialize(void) { int display; connection = xcb_connect(NULL, &display); if (xcb_connection_has_error(connection)) { errx(EXIT_FAILURE, "could not connect to the X server, bailing out."); } xcb_screen_t *screen = xcb_aux_get_screen(connection, display); root = screen->root; } int main(void) { initialize(); xcb_disconnect(connection); exit(EXIT_SUCCESS); }
Initialize X11 connection and root screen.
Initialize X11 connection and root screen.
C
mit
Airblader/xedgewarp,Airblader/xedgewarp
1d40a955d93f517c1468a62896fd2ec24e3660ce
include/swift/Basic/Dwarf.h
include/swift/Basic/Dwarf.h
//===--- Dwarf.h - DWARF constants ------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // This file defines several temporary Swift-specific DWARF constants. // //===----------------------------------------------------------------------===// #ifndef SWIFT_BASIC_DWARF_H #define SWIFT_BASIC_DWARF_H #include "llvm/Support/Dwarf.h" namespace swift { /// The DWARF version emitted by the Swift compiler. const unsigned DWARFVersion = 4; static const char MachOASTSegmentName[] = "__SWIFT"; static const char MachOASTSectionName[] = "__ast"; static const char ELFASTSectionName[] = ".swift_ast"; static const char COFFASTSectionName[] = "swiftast"; } // end namespace swift #endif // SWIFT_BASIC_DWARF_H
//===--- Dwarf.h - DWARF constants ------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // This file defines several temporary Swift-specific DWARF constants. // //===----------------------------------------------------------------------===// #ifndef SWIFT_BASIC_DWARF_H #define SWIFT_BASIC_DWARF_H #include "llvm/BinaryFormat/Dwarf.h" namespace swift { /// The DWARF version emitted by the Swift compiler. const unsigned DWARFVersion = 4; static const char MachOASTSegmentName[] = "__SWIFT"; static const char MachOASTSectionName[] = "__ast"; static const char ELFASTSectionName[] = ".swift_ast"; static const char COFFASTSectionName[] = "swiftast"; } // end namespace swift #endif // SWIFT_BASIC_DWARF_H
Adjust for new LLVM BinaryFormat library in r304864.
Adjust for new LLVM BinaryFormat library in r304864.
C
apache-2.0
lorentey/swift,xedin/swift,frootloops/swift,stephentyrone/swift,ahoppen/swift,xedin/swift,stephentyrone/swift,sschiau/swift,huonw/swift,benlangmuir/swift,karwa/swift,alblue/swift,ahoppen/swift,airspeedswift/swift,OscarSwanros/swift,return/swift,practicalswift/swift,jmgc/swift,frootloops/swift,airspeedswift/swift,parkera/swift,uasys/swift,brentdax/swift,gregomni/swift,return/swift,xedin/swift,swiftix/swift,sschiau/swift,huonw/swift,apple/swift,hooman/swift,benlangmuir/swift,devincoughlin/swift,amraboelela/swift,shajrawi/swift,JGiola/swift,danielmartin/swift,return/swift,CodaFi/swift,OscarSwanros/swift,lorentey/swift,sschiau/swift,roambotics/swift,apple/swift,uasys/swift,danielmartin/swift,jckarter/swift,swiftix/swift,milseman/swift,amraboelela/swift,danielmartin/swift,CodaFi/swift,allevato/swift,tjw/swift,shahmishal/swift,karwa/swift,benlangmuir/swift,milseman/swift,deyton/swift,benlangmuir/swift,tkremenek/swift,devincoughlin/swift,xwu/swift,amraboelela/swift,airspeedswift/swift,hooman/swift,austinzheng/swift,practicalswift/swift,gribozavr/swift,benlangmuir/swift,gribozavr/swift,CodaFi/swift,hooman/swift,aschwaighofer/swift,gregomni/swift,frootloops/swift,alblue/swift,shahmishal/swift,aschwaighofer/swift,jopamer/swift,deyton/swift,nathawes/swift,swiftix/swift,JGiola/swift,amraboelela/swift,frootloops/swift,gregomni/swift,harlanhaskins/swift,alblue/swift,shahmishal/swift,JGiola/swift,OscarSwanros/swift,xwu/swift,shajrawi/swift,lorentey/swift,deyton/swift,CodaFi/swift,rudkx/swift,xedin/swift,harlanhaskins/swift,return/swift,natecook1000/swift,devincoughlin/swift,alblue/swift,jopamer/swift,airspeedswift/swift,xwu/swift,brentdax/swift,OscarSwanros/swift,milseman/swift,atrick/swift,ahoppen/swift,parkera/swift,karwa/swift,nathawes/swift,shajrawi/swift,uasys/swift,hooman/swift,zisko/swift,shahmishal/swift,xwu/swift,return/swift,natecook1000/swift,jopamer/swift,tkremenek/swift,austinzheng/swift,danielmartin/swift,zisko/swift,xedin/swift,aschwaighofer/swift,benlangmuir/swift,harlanhaskins/swift,natecook1000/swift,xwu/swift,stephentyrone/swift,gregomni/swift,glessard/swift,rudkx/swift,zisko/swift,JGiola/swift,huonw/swift,lorentey/swift,sschiau/swift,jckarter/swift,uasys/swift,tjw/swift,zisko/swift,tkremenek/swift,jckarter/swift,rudkx/swift,OscarSwanros/swift,ahoppen/swift,devincoughlin/swift,nathawes/swift,zisko/swift,parkera/swift,milseman/swift,austinzheng/swift,gregomni/swift,devincoughlin/swift,alblue/swift,jckarter/swift,jmgc/swift,jmgc/swift,swiftix/swift,nathawes/swift,rudkx/swift,practicalswift/swift,apple/swift,jmgc/swift,brentdax/swift,brentdax/swift,ahoppen/swift,shajrawi/swift,shahmishal/swift,austinzheng/swift,sschiau/swift,roambotics/swift,glessard/swift,sschiau/swift,uasys/swift,roambotics/swift,atrick/swift,amraboelela/swift,uasys/swift,sschiau/swift,alblue/swift,deyton/swift,brentdax/swift,airspeedswift/swift,return/swift,gribozavr/swift,alblue/swift,jmgc/swift,brentdax/swift,jopamer/swift,shajrawi/swift,tjw/swift,jckarter/swift,huonw/swift,parkera/swift,hooman/swift,shajrawi/swift,aschwaighofer/swift,zisko/swift,CodaFi/swift,shahmishal/swift,stephentyrone/swift,tjw/swift,hooman/swift,aschwaighofer/swift,jckarter/swift,tkremenek/swift,natecook1000/swift,danielmartin/swift,jmgc/swift,harlanhaskins/swift,devincoughlin/swift,tjw/swift,glessard/swift,jopamer/swift,atrick/swift,frootloops/swift,nathawes/swift,lorentey/swift,danielmartin/swift,hooman/swift,allevato/swift,xedin/swift,xedin/swift,deyton/swift,atrick/swift,jckarter/swift,jmgc/swift,airspeedswift/swift,allevato/swift,milseman/swift,harlanhaskins/swift,devincoughlin/swift,lorentey/swift,gribozavr/swift,xedin/swift,glessard/swift,roambotics/swift,stephentyrone/swift,allevato/swift,apple/swift,apple/swift,aschwaighofer/swift,lorentey/swift,swiftix/swift,gribozavr/swift,parkera/swift,natecook1000/swift,harlanhaskins/swift,tjw/swift,harlanhaskins/swift,natecook1000/swift,swiftix/swift,roambotics/swift,frootloops/swift,ahoppen/swift,rudkx/swift,glessard/swift,natecook1000/swift,huonw/swift,sschiau/swift,gregomni/swift,austinzheng/swift,apple/swift,OscarSwanros/swift,devincoughlin/swift,amraboelela/swift,airspeedswift/swift,JGiola/swift,amraboelela/swift,allevato/swift,parkera/swift,stephentyrone/swift,stephentyrone/swift,deyton/swift,allevato/swift,xwu/swift,jopamer/swift,atrick/swift,aschwaighofer/swift,karwa/swift,practicalswift/swift,karwa/swift,frootloops/swift,parkera/swift,karwa/swift,glessard/swift,CodaFi/swift,danielmartin/swift,jopamer/swift,xwu/swift,tkremenek/swift,shahmishal/swift,shajrawi/swift,return/swift,milseman/swift,karwa/swift,milseman/swift,lorentey/swift,nathawes/swift,karwa/swift,parkera/swift,shajrawi/swift,zisko/swift,practicalswift/swift,austinzheng/swift,brentdax/swift,tkremenek/swift,atrick/swift,huonw/swift,tkremenek/swift,OscarSwanros/swift,nathawes/swift,roambotics/swift,practicalswift/swift,austinzheng/swift,JGiola/swift,allevato/swift,rudkx/swift,deyton/swift,practicalswift/swift,uasys/swift,huonw/swift,gribozavr/swift,practicalswift/swift,gribozavr/swift,CodaFi/swift,swiftix/swift,shahmishal/swift,tjw/swift,gribozavr/swift
068f57c5ca513befac3b3b56de36eed2ee78400d
src/common/image_base.h
src/common/image_base.h
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #ifndef VSNRAY_COMMON_IMAGE_BASE_H #define VSNRAY_COMMOM_IMAGE_BASE_H 1 #include <cstddef> #include <cstdint> #include <string> #include <vector> #include <visionaray/pixel_format.h> namespace visionaray { class image_base { public: friend class image; public: virtual bool load(std::string const& filename); virtual bool save(std::string const& filename); size_t width() const; size_t height() const; pixel_format format() const; uint8_t const* data() const; protected: size_t width_; size_t height_; pixel_format format_ = PF_RGB8; std::vector<uint8_t> data_; }; } // visionaray #endif // VSNRAY_COMMOM_IMAGE_BASE_H
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #ifndef VSNRAY_COMMON_IMAGE_BASE_H #define VSNRAY_COMMOM_IMAGE_BASE_H 1 #include <cstddef> #include <cstdint> #include <string> #include <visionaray/aligned_vector.h> #include <visionaray/pixel_format.h> namespace visionaray { class image_base { public: friend class image; public: virtual bool load(std::string const& filename); virtual bool save(std::string const& filename); size_t width() const; size_t height() const; pixel_format format() const; uint8_t const* data() const; protected: size_t width_; size_t height_; pixel_format format_ = PF_RGB8; aligned_vector<uint8_t> data_; }; } // visionaray #endif // VSNRAY_COMMOM_IMAGE_BASE_H
Store image data in aligned_vector
Store image data in aligned_vector
C
mit
tu500/visionaray,szellmann/visionaray,ukoeln-vis/ctpperf,ukoeln-vis/ctpperf,tu500/visionaray,szellmann/visionaray
adddb65f4656b0b03b24fa3868e2a8c555af18da
src/osmo-bts-sysmo/utils.h
src/osmo-bts-sysmo/utils.h
#ifndef SYSMOBTS_UTILS_H #define SYSMOBTS_UTILS_H #include <stdint.h> #include "femtobts.h" struct gsm_bts_trx; int band_femto2osmo(GsmL1_FreqBand_t band); int sysmobts_select_femto_band(struct gsm_bts_trx *trx, uint16_t arfcn); int sysmobts_get_nominal_power(struct gsm_bts_trx *trx); int sysmobts_get_target_power(struct gsm_bts_trx *trx); void sysmobts_pa_pwr_init(struct gsm_bts_trx *trx); void sysmobts_pa_maybe_step(struct gsm_bts_trx *trx); #endif
#ifndef SYSMOBTS_UTILS_H #define SYSMOBTS_UTILS_H #include <stdint.h> #include "femtobts.h" struct gsm_bts_trx; int band_femto2osmo(GsmL1_FreqBand_t band); int sysmobts_select_femto_band(struct gsm_bts_trx *trx, uint16_t arfcn); int sysmobts_get_nominal_power(struct gsm_bts_trx *trx); #endif
Remove left-over from non-generic power control
sysmobts: Remove left-over from non-generic power control
C
agpl-3.0
geosphere/osmo-bts,osmocom/osmo-bts,geosphere/osmo-bts,telenoobie/osmo-bts,telenoobie/osmo-bts,osmocom/osmo-bts,telenoobie/osmo-bts,geosphere/osmo-bts,geosphere/osmo-bts,osmocom/osmo-bts,telenoobie/osmo-bts
6b17df768563131677401dca775cf010c846c537
features/cryptocell/FEATURE_CRYPTOCELL310/mbedtls_device.h
features/cryptocell/FEATURE_CRYPTOCELL310/mbedtls_device.h
/* * mbedtls_device.h * * Copyright (C) 2018, Arm Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef __MBEDTLS_DEVICE__ #define __MBEDTLS_DEVICE__ #define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT #define MBEDTLS_SHA1_ALT #define MBEDTLS_SHA256_ALT #define MBEDTLS_SHA512_ALT #define MBEDTLS_CCM_ALT #define MBEDTLS_ECDSA_VERIFY_ALT #define MBEDTLS_ECDSA_SIGN_ALT #define MBEDTLS_ECDSA_GENKEY_ALT #define MBEDTLS_ECDH_GEN_PUBLIC_ALT #define MBEDTLS_ECDH_COMPUTE_SHARED_ALT #endif //__MBEDTLS_DEVICE__
/* * mbedtls_device.h * * Copyright (C) 2018, Arm Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef __MBEDTLS_DEVICE__ #define __MBEDTLS_DEVICE__ #define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT #define MBEDTLS_SHA1_ALT #define MBEDTLS_SHA256_ALT //#define MBEDTLS_SHA512_ALT #define MBEDTLS_CCM_ALT #define MBEDTLS_ECDSA_VERIFY_ALT #define MBEDTLS_ECDSA_SIGN_ALT #define MBEDTLS_ECDSA_GENKEY_ALT #define MBEDTLS_ECDH_GEN_PUBLIC_ALT #define MBEDTLS_ECDH_COMPUTE_SHARED_ALT #endif //__MBEDTLS_DEVICE__
Make the alternative sha512 optional
Make the alternative sha512 optional Have the alternative sha512 undefined by default, in order not to break backwards compatability.
C
apache-2.0
kjbracey-arm/mbed,kjbracey-arm/mbed,mbedmicro/mbed,kjbracey-arm/mbed,mbedmicro/mbed,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,mbedmicro/mbed
97ad6120c4d1d754486b845a77edc4e73eabcf39
CS_143/Router.h
CS_143/Router.h
#ifndef __CS_143__Router__ #define __CS_143__Router__ #include <string> #include "Device.h" class Router : public Device { public: // Bellman-Ford //void updateRouting(Packet); // create static routing table void addRouting(Packet); // add a link to the router void addLink(std::string link_id); // get proper routing given host id std::string getRouting(std::string targ_host); // react to a packet event void giveEvent(std::unique_ptr<PacketEvent>); private: // Routing table maps destination host ids to link ids std::map<std::string, std::string> routing_table; // All links connected to this router std::vector<std::string> links; }; #endif /* defined(__CS_143__Router__) */
#ifndef __CS_143__Router__ #define __CS_143__Router__ #include <string> #include "Device.h" class Router : public Device { public: // Bellman-Ford //void updateRouting(Packet); // create static routing table void addRouting(Packet); // add a link to the router void addLink(std::string link_id); // get proper routing given host id std::string getRouting(std::string targ_host); // react to a packet event void giveEvent(std::unique_ptr<PacketEvent>); private: // TODO: this could probably be an unordered_map // Routing table maps destination host ids to link ids std::map<std::string, std::string> routing_table; // All links connected to this router std::vector<std::string> links; }; #endif /* defined(__CS_143__Router__) */
Add comment about unordered map
Add comment about unordered map
C
mit
zatricion/NetSim,zatricion/NetSim,zatricion/NetSim,zatricion/NetSim
cefaf9c58a58eeba6034ac1ad6f64086b7e4190b
include/DgospreyRevision.h
include/DgospreyRevision.h
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */ #ifndef DGOSPREY_REVISION_H #define DGOSPREY_REVISION_H #define DGOSPREY_REVISION "git commit 8603d37 on 2015-01-21" #endif // DGOSPREY_REVISION_H
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */ #ifndef DGOSPREY_REVISION_H #define DGOSPREY_REVISION_H #define DGOSPREY_REVISION "git commit 660a43d on 2015-02-09" #endif // DGOSPREY_REVISION_H
Test run successful after libmesh update
Test run successful after libmesh update
C
lgpl-2.1
lindsayad/dgosprey-fork,lindsayad/dgosprey-fork,lindsayad/dgosprey-fork,aladshaw3/dgosprey,aladshaw3/dgosprey,aladshaw3/dgosprey,aladshaw3/dgosprey,lindsayad/dgosprey-fork
8c0a9b8bc56ad4a3cc29f10ae747a7cd0f1eb531
src/guacenc/image-stream.h
src/guacenc/image-stream.h
/* * Copyright (C) 2016 Glyptodon, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef GUACENC_IMAGE_STREAM_H #define GUACENC_IMAGE_STREAM_H #include "config.h" /** * The current state of an allocated Guacamole image stream. */ typedef struct guacenc_image_stream { /** * STUB: Placeholder property. This property exists only so that the * guacenc_image_stream struct can be defined prior to implementation. */ int __PLACEHOLDER; } guacenc_image_stream; #endif
/* * Copyright (C) 2016 Glyptodon, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef GUACENC_IMAGE_STREAM_H #define GUACENC_IMAGE_STREAM_H #include "config.h" /** * The current state of an allocated Guacamole image stream. */ typedef struct guacenc_image_stream { /** * The index of the destination layer or buffer. */ int index; /** * The Guacamole protocol compositing operation (channel mask) to apply * when drawing the image. */ int mask; } guacenc_image_stream; #endif
Replace placeholder with required mask and index properties.
GUAC-236: Replace placeholder with required mask and index properties.
C
apache-2.0
apache/guacamole-server,flangelo/guacamole-server,glyptodon/guacamole-server,mike-jumper/incubator-guacamole-server,glyptodon/guacamole-server,mike-jumper/incubator-guacamole-server,flangelo/guacamole-server,apache/guacamole-server,apache/guacamole-server,glyptodon/guacamole-server,mike-jumper/incubator-guacamole-server,mike-jumper/incubator-guacamole-server,flangelo/guacamole-server,flangelo/guacamole-server
03aa62a6586db5c9065846140fd974de29fd363d
TrustKit/Reporting/TSKPinFailureReport.h
TrustKit/Reporting/TSKPinFailureReport.h
// // TSKPinFailureReport.h // TrustKit // // Created by Alban Diquet on 5/27/15. // Copyright (c) 2015 Data Theorem. All rights reserved. // #import <Foundation/Foundation.h> @interface TSKPinFailureReport : NSObject @property (readonly) NSString *appBundleId; @property (readonly) NSString *appVersion; @property (readonly) NSString *notedHostname; @property (readonly) NSString *serverHostname; @property (readonly) NSNumber *serverPort; @property (readonly) NSDate *dateTime; @property (readonly) BOOL includeSubdomains; @property (readonly) NSArray *validatedCertificateChain; @property (readonly) NSArray *knownPins; // Init with default bundle ID and current time as the date-time - (instancetype) initWithAppBundleId:(NSString *) appBundleId appVersion:(NSString *)appVersion notedHostname:(NSString *)notedHostname serverHostname:(NSString *)serverHostname port:(NSNumber *)serverPort dateTime:(NSDate *)dateTime includeSubdomains:(BOOL) includeSubdomains validatedCertificateChain:(NSArray *)validatedCertificateChain knownPins:(NSArray *)knownPins; // Return the report in JSON format for POSTing it - (NSData *)json; // Return a request ready to be sent with the report in JSON format in the response's body - (NSMutableURLRequest *)requestToUri:(NSURL *)reportUri; @end
// // TSKPinFailureReport.h // TrustKit // // Created by Alban Diquet on 5/27/15. // Copyright (c) 2015 Data Theorem. All rights reserved. // #import <Foundation/Foundation.h> @interface TSKPinFailureReport : NSObject @property (readonly, nonatomic) NSString *appBundleId; // Not part of the HPKP spec @property (readonly, nonatomic) NSString *appVersion; // Not part of the HPKP spec @property (readonly, nonatomic) NSString *notedHostname; @property (readonly, nonatomic) NSString *serverHostname; @property (readonly, nonatomic) NSNumber *serverPort; @property (readonly, nonatomic) NSDate *dateTime; @property (readonly, nonatomic) BOOL includeSubdomains; @property (readonly, nonatomic) NSArray *validatedCertificateChain; @property (readonly, nonatomic) NSArray *knownPins; // Init with default bundle ID and current time as the date-time - (instancetype) initWithAppBundleId:(NSString *) appBundleId appVersion:(NSString *)appVersion notedHostname:(NSString *)notedHostname serverHostname:(NSString *)serverHostname port:(NSNumber *)serverPort dateTime:(NSDate *)dateTime includeSubdomains:(BOOL) includeSubdomains validatedCertificateChain:(NSArray *)validatedCertificateChain knownPins:(NSArray *)knownPins; // Return the report in JSON format for POSTing it - (NSData *)json; // Return a request ready to be sent with the report in JSON format in the response's body - (NSMutableURLRequest *)requestToUri:(NSURL *)reportUri; @end
Switch to non atomic properties
Switch to non atomic properties
C
mit
datatheorem/TrustKit,FredericJacobs/TrustKit,FredericJacobs/TrustKit,datatheorem/TrustKit,CedarLogic/TrustKit,CedarLogic/TrustKit,FredericJacobs/TrustKit,CedarLogic/TrustKit,datatheorem/TrustKit,datatheorem/TrustKit
1c871b33812d0c7f22b0490593485f6d7d6f80d6
src/wordcounts.h
src/wordcounts.h
#ifndef __WORDCOUNTS_H__ #define __WORDCOUNTS_H__ #include <string> #include <map> #include <Rcpp.h> typedef std::unordered_map<std::string, int> hashmap; class WordCounts { private: hashmap map; public: WordCounts(); ~WordCounts(); void print(); Rcpp::DataFrame as_data_frame(); void add_word(std::string); }; #endif
#ifndef __WORDCOUNTS_H__ #define __WORDCOUNTS_H__ #include <string> #include <unordered_map> #include <Rcpp.h> typedef std::unordered_map<std::string, int> hashmap; class WordCounts { private: hashmap map; public: WordCounts(); ~WordCounts(); void print(); Rcpp::DataFrame as_data_frame(); void add_word(std::string); }; #endif
Replace include <map> with <unordered_map>
Replace include <map> with <unordered_map>
C
unlicense
zbwrnz/zwc
f26f972cf79bc911fd3997d903128b7aac8b1677
cbits/h_iconv.c
cbits/h_iconv.c
#include "h_iconv.h" // Wrapper functions, since iconv_open et al are macros in libiconv. iconv_t h_iconv_open(const char *tocode, const char *fromcode) { return iconv_open(tocode, fromcode); } void h_iconv_close(iconv_t cd) { iconv_close(cd); } size_t h_iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { return iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft); }
#include "h_iconv.h" // Wrapper functions, since iconv_open et al are macros in libiconv. iconv_t h_iconv_open(const char *tocode, const char *fromcode) { return iconv_open(tocode, fromcode); } void h_iconv_close(iconv_t cd) { iconv_close(cd); } size_t h_iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { // Cast inbuf to (void*) so that it works both on Solaris, which expects // a (const char**), and on other platforms (e.g. Linux), which expect // a (char **). return iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft); }
Add a comment explaining why iconv needs a (void*) for its parameter.
Add a comment explaining why iconv needs a (void*) for its parameter.
C
bsd-3-clause
judah/haskeline,ghc/packages-haskeline,leroux/packages-haskeline,ghc/packages-haskeline,judah/haskeline
58e986af5cca1bce399680feacaf3d394700acc2
host/WProgram.h
host/WProgram.h
#ifndef WProgram_h #define WProgram_h #ifndef HOST_MIDIDUINO #define HOST_MIDIDUINO #endif #define _BV(i) (1 << (i)) #define PSTR(s) (s) #define GUI_NUM_ENCODERS 4 #define GUI_NUM_BUTTONS 4 #define BUTTON_PRESSED(i) false #define BUTTON_RELEASED(i) false #define BUTTON_DOWN(i) false #define BUTTON_UP(i) true #include <stdio.h> void handleIncomingMidi(); #define BOARD_ID 0x89 #define SYSEX_BUF_SIZE 8192 #define setLed() #define clearLed() #define setLed2() #define clearLed2() #define PROGMEM #ifdef __cplusplus extern "C" { #endif #include <inttypes.h> #ifdef __cplusplus } #endif #include "helpers.h" #include "WMath.h" #define MIDIDUINO_HANDLE_SYSEX #include "Midi.h" #include "MidiClock.h" #include "MidiUartHost.h" #include "GUI_private.h" void hexDump(uint8_t *data, uint16_t len); #endif /* WProgram_h */
#ifndef WProgram_h #define WProgram_h #ifndef HOST_MIDIDUINO #define HOST_MIDIDUINO #endif #define _BV(i) (1 << (i)) #define PSTR(s) (s) #define GUI_NUM_ENCODERS 4 #define GUI_NUM_BUTTONS 8 #include <stdio.h> void handleIncomingMidi(); #define BOARD_ID 0x89 #define SYSEX_BUF_SIZE 8192 #define setLed() #define clearLed() #define setLed2() #define clearLed2() #define PROGMEM #ifdef __cplusplus extern "C" { #endif #include <inttypes.h> #ifdef __cplusplus } #endif #include "helpers.h" #include "WMath.h" #define MIDIDUINO_HANDLE_SYSEX #include "Midi.h" #include "MidiClock.h" #include "MidiUartHost.h" #include "GUI_private.h" void hexDump(uint8_t *data, uint16_t len); #endif /* WProgram_h */
Fix number of buttons on the host and remove the placeholder macros
Fix number of buttons on the host and remove the placeholder macros
C
lgpl-2.1
wesen/mididuino,wesen/mididuino,wesen/mididuino,wesen/mididuino,wesen/mididuino,wesen/mididuino
9e868196a26d39cd38f1f2b07876ffcea5037076
sql/sqlite/inc/TSQLiteRow.h
sql/sqlite/inc/TSQLiteRow.h
// @(#)root/sqlite:$Id$ // Author: o.freyermuth <o.f@cern.ch>, 01/06/2013 /************************************************************************* * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TPgSQLRow #define ROOT_TPgSQLRow #ifndef ROOT_TSQLRow #include "TSQLRow.h" #endif #if !defined(__CINT__) #include <sqlite3.h> #else struct sqlite3_stmt; #endif class TSQLiteRow : public TSQLRow { private: sqlite3_stmt *fResult; // current result set Bool_t IsValid(Int_t field); public: TSQLiteRow(void *result, ULong_t rowHandle); ~TSQLiteRow(); void Close(Option_t *opt=""); ULong_t GetFieldLength(Int_t field); const char *GetField(Int_t field); ClassDef(TSQLiteRow,0) // One row of SQLite query result }; #endif
// @(#)root/sqlite: // Author: o.freyermuth <o.f@cern.ch>, 01/06/2013 /************************************************************************* * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TSQLiteRow #define ROOT_TSQLiteRow #ifndef ROOT_TSQLRow #include "TSQLRow.h" #endif #if !defined(__CINT__) #include <sqlite3.h> #else struct sqlite3_stmt; #endif class TSQLiteRow : public TSQLRow { private: sqlite3_stmt *fResult; // current result set Bool_t IsValid(Int_t field); public: TSQLiteRow(void *result, ULong_t rowHandle); ~TSQLiteRow(); void Close(Option_t *opt=""); ULong_t GetFieldLength(Int_t field); const char *GetField(Int_t field); ClassDef(TSQLiteRow,0) // One row of SQLite query result }; #endif
Fix fatal typo in code guard
Fix fatal typo in code guard
C
lgpl-2.1
tc3t/qoot,kirbyherm/root-r-tools,tc3t/qoot,tc3t/qoot,Dr15Jones/root,tc3t/qoot,Dr15Jones/root,tc3t/qoot,Dr15Jones/root,Dr15Jones/root,tc3t/qoot,kirbyherm/root-r-tools,Dr15Jones/root,kirbyherm/root-r-tools,kirbyherm/root-r-tools,tc3t/qoot,tc3t/qoot,kirbyherm/root-r-tools,Dr15Jones/root,Dr15Jones/root,kirbyherm/root-r-tools,kirbyherm/root-r-tools,tc3t/qoot,tc3t/qoot
7bf1f1785e610d9d5148552963edb7b00ff77700
src/uri_judge/begginer/1098_sequence_ij_4.c
src/uri_judge/begginer/1098_sequence_ij_4.c
/** https://www.urionlinejudge.com.br/judge/en/problems/view/1098 TODO: Resolver a formatação da última impressão do loop. Está: I=2.0 J=3.0 I=2.0 J=4.0 I=2.0 J=5.0 Mas deveria estar: I=2 J=3 I=2 J=4 I=2 J=5 */ #include <stdio.h> int main(){ double i, j; i = 0; do{ for (j = 1; j <= 3; j++){ if (i == (int) i){ printf("I=%.0lf J=%.0lf\n", i, i+j); } else{ printf("I=%.1lf J=%.1lf\n", i, i+j); } } i += 0.2; //printf("Finalizando loop... Double: %lf e Float: %d\n", (double) i, (int) i); // debug } while(i <= 2.0); return 0; }
/** https://www.urionlinejudge.com.br/judge/en/problems/view/1098 */ #include <stdio.h> int main(){ int i, j; float iR, jR; for(i = 0; i <= 20; i += 2){ for (j = 10; j <= 30; j += 10){ iR = (float) i/10; jR = (float) (i+j)/10; if (i % 10) printf("I=%.1f J=%.1f\n", iR, jR); else printf("I=%.0f J=%.0f\n", iR, jR); } } return 0; }
Fix bug and solves the sequence
Fix bug and solves the sequence
C
unknown
Mazuh/MISC-Algs,Mazuh/Algs,Mazuh/Algs,Mazuh/Algs,Mazuh/Algs,Mazuh/MISC-Algs,Mazuh/MISC-Algs,Mazuh/Algs,Mazuh/MISC-Algs
38aacad3cb4842a267d2cd5a22d0e6439c0d37e6
drivers/auth/mbedtls/mbedtls_common.c
drivers/auth/mbedtls/mbedtls_common.c
/* * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <debug.h> /* mbed TLS headers */ #include <mbedtls/memory_buffer_alloc.h> #include <mbedtls/platform.h> /* * mbed TLS heap */ #if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA) #define MBEDTLS_HEAP_SIZE (14*1024) #elif (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA) #define MBEDTLS_HEAP_SIZE (6*1024) #endif static unsigned char heap[MBEDTLS_HEAP_SIZE]; /* * mbed TLS initialization function */ void mbedtls_init(void) { static int ready; if (!ready) { /* Initialize the mbed TLS heap */ mbedtls_memory_buffer_alloc_init(heap, MBEDTLS_HEAP_SIZE); /* Use reduced version of snprintf to save space. */ mbedtls_platform_set_snprintf(tf_snprintf); ready = 1; } }
/* * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <debug.h> /* mbed TLS headers */ #include <mbedtls/memory_buffer_alloc.h> #include <mbedtls/platform.h> /* * mbed TLS heap */ #if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA) #define MBEDTLS_HEAP_SIZE (14*1024) #elif (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA) #define MBEDTLS_HEAP_SIZE (7*1024) #endif static unsigned char heap[MBEDTLS_HEAP_SIZE]; /* * mbed TLS initialization function */ void mbedtls_init(void) { static int ready; if (!ready) { /* Initialize the mbed TLS heap */ mbedtls_memory_buffer_alloc_init(heap, MBEDTLS_HEAP_SIZE); /* Use reduced version of snprintf to save space. */ mbedtls_platform_set_snprintf(tf_snprintf); ready = 1; } }
Increase heapsize for mbedtls library
Increase heapsize for mbedtls library The mbedTLS library requires larger heap memory for verification of RSASSA-PSS signature in certificates during Trusted Board Boot. This patch increases the heap memory for the same. Change-Id: I3c3123d7142b7b7b01463516ec436734895da159 Signed-off-by: Soby Mathew <4d7af7c5c404e07961f9e1e79d6f17409c1d7db7@arm.com>
C
bsd-3-clause
achingupta/arm-trusted-firmware,lsigithub/arm-trusted-firmware_public,lsigithub/arm-trusted-firmware_public,achingupta/arm-trusted-firmware
c58ad1fadf8452588badec5c236425aeba82c850
runtime/bin/socket_base_fuchsia.h
runtime/bin/socket_base_fuchsia.h
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #ifndef RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_ #define RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_ #if !defined(RUNTIME_BIN_SOCKET_BASE_H_) #error Do not include socket_base_fuchsia.h directly. Use socket_base.h. #endif #include <arpa/inet.h> #include <netdb.h> #include <sys/socket.h> #endif // RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #ifndef RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_ #define RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_ #if !defined(RUNTIME_BIN_SOCKET_BASE_H_) #error Do not include socket_base_fuchsia.h directly. Use socket_base.h. #endif #include <arpa/inet.h> #include <netdb.h> #include <sys/socket.h> #include <sys/un.h> #endif // RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_
Fix Unix domain socket headers for Fuchsia
[dart:io] Fix Unix domain socket headers for Fuchsia Change-Id: I053b41e29184f5edb3d4f19573ead5124528f12c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140624 Reviewed-by: Zichang Guo <d26af3001798f91912fb1504666bca93c093d553@google.com> Commit-Queue: Jason Simmons <345008440c885d4763d50f58e545b9839f60f79f@google.com>
C
bsd-3-clause
dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk
386d0f2cc405b3f65615f8d50d00ffcbb88c1a9d
src/event.c
src/event.c
#include "event.h" int init_event_system(void) { event_loop = uv_loop_new(); return 1; } void cleanup_event_system(void) { log_message(LOG_DEBUG, "cleaning up event system!\n"); uv_loop_close(event_loop); free(event_loop); } void event_process(void) { log_message(LOG_DEBUG, "processing events!\n"); uv_run(event_loop, UV_RUN_DEFAULT); }
#include "event.h" int init_event_system(void) { event_loop = malloc(sizeof *event_loop); if (!event_loop) { log_message(LOG_ERROR, "Could not allocate memory for event loop"); return 0; } if (uv_loop_init(event_loop) < 0) { log_message(LOG_ERROR, "Could not initialize event loop"); free(event_loop); return 0; } return 1; } void cleanup_event_system(void) { log_message(LOG_DEBUG, "cleaning up event system!\n"); uv_loop_close(event_loop); free(event_loop); } void event_process(void) { log_message(LOG_DEBUG, "processing events!\n"); uv_run(event_loop, UV_RUN_DEFAULT); }
Initialize loop using new API
Initialize loop using new API
C
bsd-2-clause
CloudSites/OpenBalance,CloudSites/OpenBalance,CloudSites/OpenBalance
c162a1e20af4a2bb48f86f4faeb0be09dbe75c75
tests/longjmp/setlongjmp.c
tests/longjmp/setlongjmp.c
/* * Copyright 2010 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <setjmp.h> #include <stdio.h> static jmp_buf buf; int main(void) { volatile int result = -1; if (!setjmp(buf) ) { result = 55; printf("setjmp was invoked\n"); longjmp(buf, 1); printf("this print statement is not reached\n"); return -1; } else { printf("longjmp was invoked\n"); return result; } }
/* * Copyright 2010 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <setjmp.h> #include <stdio.h> #include "native_client/src/include/nacl_assert.h" static jmp_buf buf; int trysetjmp(int longjmp_arg) { volatile int result = -1; int setjmp_ret = -1; setjmp_ret = setjmp(buf); if (!setjmp_ret) { /* Check that setjmp() doesn't return 0 multiple times */ ASSERT_EQ(result, -1); result = 55; printf("setjmp was invoked\n"); longjmp(buf, longjmp_arg); printf("this print statement is not reached\n"); return -1; } else { int expected_ret = longjmp_arg != 0 ? longjmp_arg : 1; ASSERT_EQ(setjmp_ret, expected_ret); printf("longjmp was invoked\n"); return result; } } int main(void) { if (trysetjmp(1) != 55 || trysetjmp(0) != 55 || trysetjmp(-1) != 55) return -1; return 55; }
Test that invoking longjmp with an argument of 0 causes setjmp to return 1
Test that invoking longjmp with an argument of 0 causes setjmp to return 1 Newlib's x86_64 implementation of longjmp previously failed for this case. Update the setlongjmp.c test to check the return value of setjmp. Additionally fail if setjmp returns 0 twice to avoid an infinite loop in the recent failure case. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4088 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/926533003
C
bsd-3-clause
sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client
1efee7879cd4c6dda74f38f807155a8497fd046d
test/CodeGen/unsupported.c
test/CodeGen/unsupported.c
// RUN: clang -verify -emit-llvm -o - %s int f0(int x) { int vla[x]; return vla[x-1]; // expected-error {{cannot compile this return inside scope with VLA yet}} }
// RUN: clang -verify -emit-llvm -o - %s void *x = L"foo"; // expected-error {{cannot compile this wide string yet}}
Update test case; VLA's are now supported.
Update test case; VLA's are now supported. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@64168 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,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
2b4ca17c046947150b49eb22a7b026a29482a2a7
source/gloperate-qt/include/gloperate-qt/qt-includes-begin.h
source/gloperate-qt/include/gloperate-qt/qt-includes-begin.h
/******************************************************************************\ * gloperate * * Copyright (C) 2014 Computer Graphics Systems Group at the * Hasso-Plattner-Institut (HPI), Potsdam, Germany. \******************************************************************************/ // Turn off warnings generated by Qt headers (this project uses 'treat warning as errors') #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" #pragma GCC diagnostic ignored "-Wfloat-conversion" #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wswitch" #endif
/******************************************************************************\ * gloperate * * Copyright (C) 2014 Computer Graphics Systems Group at the * Hasso-Plattner-Institut (HPI), Potsdam, Germany. \******************************************************************************/ // Turn off warnings generated by Qt headers (this project uses 'treat warning as errors') #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wswitch" #endif
Remove unrecognized gcc warning flag
Remove unrecognized gcc warning flag
C
mit
cginternals/gloperate,lanice/gloperate,Beta-Alf/gloperate,cginternals/gloperate,j-o/gloperate,lanice/gloperate,j-o/gloperate,hpicgs/gloperate,j-o/gloperate,Beta-Alf/gloperate,p-otto/gloperate,hpi-r2d2/gloperate,p-otto/gloperate,cginternals/gloperate,hpicgs/gloperate,p-otto/gloperate,hpicgs/gloperate,hpi-r2d2/gloperate,lanice/gloperate,p-otto/gloperate,cginternals/gloperate,lanice/gloperate,p-otto/gloperate,j-o/gloperate,hpicgs/gloperate,hpicgs/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,lanice/gloperate,Beta-Alf/gloperate
a9c930d89e24dcb68345df73f6f8068224b34e66
src/port/gui.c
src/port/gui.c
#include "../sccs.h" /* * Copyright (c) 2001 Andrew Chang All rights reserved. */ int gui_useDisplay(void) { char *p; if ((p = getenv("BK_NO_GUI_PROMPT")) && *p) return (0); if (win32() || macosx()) return ((p = getenv("BK_GUI")) && *p); return (getenv("DISPLAY") && (p = getenv("BK_GUI")) && *p); } char * gui_displayName(void) { #ifdef WIN32 return ("monitor"); #else if (gui_useAqua()) {return ("monitor");} return (getenv("DISPLAY")); #endif } int gui_useAqua(void) { #ifdef __APPLE__ char *disp = getenv("DISPLAY"); if ((disp == 0) || strneq(disp, "/tmp/launch", 11)) return (1); #endif return 0; }
#include "../sccs.h" /* * Copyright (c) 2001 Andrew Chang All rights reserved. */ int gui_useDisplay(void) { char *p; if ((p = getenv("BK_NO_GUI_PROMPT")) && *p) return (0); if (win32() || macosx()) return ((p = getenv("BK_GUI")) && *p); return (getenv("DISPLAY") && (p = getenv("BK_GUI")) && *p); } char * gui_displayName(void) { #ifdef WIN32 return ("monitor"); #else if (gui_useAqua()) {return ("monitor");} return (getenv("DISPLAY")); #endif } int gui_useAqua(void) { #ifdef __APPLE__ char *disp = getenv("DISPLAY"); if ((disp == 0) || strneq(disp, "/tmp/launch", 11) || strstr(disp, "com.apple.launchd")) return (1); #endif return 0; }
Fix launching our GUIs in Mac OS X 10.10.
Fix launching our GUIs in Mac OS X 10.10. bk: 54947f4dZaedAuVpUTDfrtsbDBPyVA
C
apache-2.0
bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper
cc680488220415b0d04a30c5c08e23eb6dc05c96
test/main.c
test/main.c
#include <stdlib.h> #include <stdio.h> #include "../src/prompt.h" int main(void) { for (;;) { char *line = prompt("> "); if (line == NULL) break; printf("You wrote '%s'\n", line); free(line); } prompt_free(); return 0; }
#include <stdlib.h> #include <stdio.h> #ifdef DEBUG # include "../src/prompt.h" #else # include <prompt.h> #endif int main(void) { for (;;) { char *line = prompt("> "); if (line == NULL) break; printf("You wrote '%s'\n", line); free(line); } prompt_free(); return 0; }
Set header location depending on flags
Set header location depending on flags
C
isc
lollek/libprompt
97738e2694165e58e33dadc7ec0411beb048c449
src/loginwindow.h
src/loginwindow.h
#ifndef _LOGINWINDOW_H_ #define _LOGINWINDOW_H_ #include <string> #include <iostream> #include "window.h" using namespace std; class LoginWindow : public Window { string name; string pass; public: LoginWindow():Window("Login") {} const string& getUsername() const { return name; } const string& getPassword() const { return pass; } virtual void handle() { bool passSet = false; bool nameSet = false; do { drawTitle(); cout << "User: " << name << endl; cout << "Password: " << pass << endl; cout << endl << "Write 'u' to edit the username, 'p' to edit the password." << endl; string cmd = readCommand(); if(cmd == "u") { string name = readCommand("User > "); this->name = name; nameSet = (name != ""); }else if(cmd == "p") { string pass = readCommand("Pass > "); this->pass = pass; passSet = (pass != ""); } }while(!passSet || !nameSet); } }; #endif
#ifndef _LOGINWINDOW_H_ #define _LOGINWINDOW_H_ #include <string> #include <iostream> #include "window.h" using namespace std; class LoginWindow : public Window { string name; string pass; public: LoginWindow():Window("Login") {} const string& getUsername() const { return name; } const string& getPassword() const { return pass; } virtual void handle() { bool complete = false; do { drawTitle(); cout << "User: " << name << endl; cout << "Password: " << string(pass.length(),'*') << endl; cout << endl << "Write 'u' to edit the username, 'p' to edit the password." << endl; if(pass != "" && name != "") { cout << "Write 'l' to login." << endl; } string cmd = readCommand(); if(cmd == "u") { string name = readCommand("User > "); this->name = name; }else if(cmd == "p") { string pass = readCommand("Pass > "); this->pass = pass; }else if(pass != "" && name != "" && cmd == "l") { complete = true; } }while(!complete); } }; #endif
Change login logic, add 'l' cmd
Change login logic, add 'l' cmd
C
mit
nyz93/advertapp,nyz93/advertapp
8ab0d21f8a7b364e5649abaa534304e9474c08f8
searchcore/src/vespa/searchcore/proton/bucketdb/remove_batch_entry.h
searchcore/src/vespa/searchcore/proton/bucketdb/remove_batch_entry.h
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/document/base/globalid.h> #include <vespa/document/bucket/bucketid.h> #include <persistence/spi/types.h> namespace proton::bucketdb { class RemoveBatchEntry { document::GlobalId _gid; document::BucketId _bucket_id; storage::spi::Timestamp _timestamp; uint32_t _doc_size; public: RemoveBatchEntry(const document::GlobalId& gid, const document::BucketId& bucket_id, const storage::spi::Timestamp& timestamp, uint32_t doc_size) noexcept : _gid(gid), _bucket_id(bucket_id), _timestamp(timestamp), _doc_size(doc_size) { } const document::GlobalId& get_gid() const noexcept { return _gid; } const document::BucketId& get_bucket_id() const noexcept { return _bucket_id; } const storage::spi::Timestamp& get_timestamp() const noexcept { return _timestamp; } uint32_t get_doc_size() const noexcept { return _doc_size; } }; }
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/document/base/globalid.h> #include <vespa/document/bucket/bucketid.h> #include <persistence/spi/types.h> namespace proton::bucketdb { /* * Class containing meta data for a single document being removed from * bucket db. */ class RemoveBatchEntry { document::GlobalId _gid; document::BucketId _bucket_id; storage::spi::Timestamp _timestamp; uint32_t _doc_size; public: RemoveBatchEntry(const document::GlobalId& gid, const document::BucketId& bucket_id, const storage::spi::Timestamp& timestamp, uint32_t doc_size) noexcept : _gid(gid), _bucket_id(bucket_id), _timestamp(timestamp), _doc_size(doc_size) { } const document::GlobalId& get_gid() const noexcept { return _gid; } const document::BucketId& get_bucket_id() const noexcept { return _bucket_id; } const storage::spi::Timestamp& get_timestamp() const noexcept { return _timestamp; } uint32_t get_doc_size() const noexcept { return _doc_size; } }; }
Add class comment for proton::bucketdb::RemoveBatchEntry.
Add class comment for proton::bucketdb::RemoveBatchEntry.
C
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
02e86ccfe9fc04afbd5275d4b2f27881d61e3ced
ServerMonitoringService/ServerMonitoringService/SystemMemory.h
ServerMonitoringService/ServerMonitoringService/SystemMemory.h
#ifndef _SYSTEMEMORY_H_ #define _SYSTEMEMORY_H_ #include "windows.h" class SystemMemory { private: MEMORYSTATUSEX memoryStat; private: int memoryCall(); public: int getLoadPercent(int &val); int getUsage(double &val); int getTotalByte(DWORD &val); int getFreeByte(DWORD &val); }; #endif
#ifndef _SYSTEMEMORY_H_ #define _SYSTEMEMORY_H_ #include "windows.h" typedef unsigned long DWORD; class SystemMemory { private: MEMORYSTATUSEX memoryStat; private: int memoryCall(); public: int getLoadPercent(int &val); int getUsage(double &val); int getTotalByte(DWORD &val); int getFreeByte(DWORD &val); }; #endif
Define 'unsigned long' as 'DWORD' for cross-platform
Define 'unsigned long' as 'DWORD' for cross-platform
C
mit
bg0820/SMS,bg0820/SMS
268f2a58905b8528cdc17556388dd28848fa18d0
sa.h
sa.h
#ifndef FINAL_SEQUENTIALSA_SA_H_ #define FINAL_SEQUENTIALSA_SA_H_ #endif // FINAL_SEQUENTIALSA_SA_H_
#ifndef FINAL_SEQUENTIALSA_SA_H_ #define FINAL_SEQUENTIALSA_SA_H_ #define TEMPERATURE 100 /*Initial temperature*/ #define TEMPERATURE_DECREMENT 0.99 /*The amount by which teh temperature is decrement each iteration*/ #define TEMPERATURE_FINAL 0.01 /*The coolest temperature, time to stop*/ #define NUMBER_ITERATIONS 1000 /*Total number of iterations to execute before reducing temperature*/ #define ITERATIONS_PER_FILE 5 /*Number of times to run each input file*/ #endif // FINAL_SEQUENTIALSA_SA_H_
Move constant declarations to header file
Move constant declarations to header file
C
mit
vramdhanie/sequentialsa,vramdhanie/sequentialsa
6c241d80c44336405e199ff0c96c876d17b939e4
gmtk.h
gmtk.h
#ifndef _GMTK_H_ #define _GMTK_H_ #include "half.h" #include "angle.h" #include "vector.h" #include "matrix.h" #include "quaternion.h" #endif//_GMTK_H_
#ifndef _GMTK_H_ #define _GMTK_H_ #include "half.h" #include "angle.h" #include "percent.h" #include "vector.h" #include "matrix.h" #include "quaternion.h" #endif//_GMTK_H_
Add percentage class to main header
Add percentage class to main header
C
mit
dyeo/gmtk,DanYeomans/gmtk,DanYeomans/gmtk,dyeo/gmtk
dc0e7eda7bc21434d072fb925685a82b4b0b38e2
kilo.c
kilo.c
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <termios.h> #include <unistd.h> struct termios orig_termios; void disable_raw_mode() { tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios); } void enable_raw_mode() { tcgetattr(STDIN_FILENO, &orig_termios); atexit(disable_raw_mode); struct termios raw = orig_termios; raw.c_lflag &= ~(ECHO | ICANON); tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw); } int main() { enable_raw_mode(); char c; while (read(STDIN_FILENO, &c, 1) == 1 && c != 'q') { if (iscntrl(c)) { printf("%d\n", c); } else { printf("%d ('%c')\n", c, c); } } return 0; }
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <termios.h> #include <unistd.h> struct termios orig_termios; void disable_raw_mode() { tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios); } void enable_raw_mode() { tcgetattr(STDIN_FILENO, &orig_termios); atexit(disable_raw_mode); struct termios raw = orig_termios; raw.c_lflag &= ~(ECHO | ICANON | ISIG); tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw); } int main() { enable_raw_mode(); char c; while (read(STDIN_FILENO, &c, 1) == 1 && c != 'q') { if (iscntrl(c)) { printf("%d\n", c); } else { printf("%d ('%c')\n", c, c); } } return 0; }
Disable Ctrl-C and Ctrl-Z (Ctrl-Y on macOS)
Disable Ctrl-C and Ctrl-Z (Ctrl-Y on macOS)
C
bsd-2-clause
oldsharp/kilo,oldsharp/kilo
cd84c7964893696d19844fdd281095ad57c109b2
utils/cbits/DebugCallback.c
utils/cbits/DebugCallback.c
#include <stdio.h> #include <stdlib.h> #include <vulkan/vulkan.h> VKAPI_ATTR VkBool32 VKAPI_CALL debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData) { fprintf(stderr, "Validation: %s\n", pCallbackData->pMessage); return VK_FALSE; } VKAPI_ATTR VkBool32 VKAPI_CALL debugCallbackFatal(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData) { int errorBitSet = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT & messageSeverity; int isError = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT == errorBitSet; fprintf(stderr, "Validation: %s\n", pCallbackData->pMessage); if (isError) { fprintf(stderr, "Aborting on validation error.\n"); abort(); } return VK_FALSE; }
#include <stdio.h> #include <stdlib.h> #include <vulkan/vulkan.h> VKAPI_ATTR VkBool32 VKAPI_CALL debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData) { fprintf(stderr, "Validation: %s\n", pCallbackData->pMessage); return VK_FALSE; } VKAPI_ATTR VkBool32 VKAPI_CALL debugCallbackFatal(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData) { debugCallback(messageSeverity, messageType, pCallbackData, pUserData); if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) { fprintf(stderr, "Aborting on validation error.\n"); abort(); } return VK_FALSE; }
Write debugCallbackFatal in terms of debugCallback
Write debugCallbackFatal in terms of debugCallback
C
bsd-3-clause
expipiplus1/vulkan,expipiplus1/vulkan,expipiplus1/vulkan
097e181807b77c8bf0427837c508bddbb8cc0330
source/threadingzeug/include/threadingzeug/parallelfor.h
source/threadingzeug/include/threadingzeug/parallelfor.h
#pragma once #include <functional> #include <vector> #include <threadingzeug/threadingzeug.h> namespace threadingzeug { template<typename T> THREADINGZEUG_API void parallel_for(const std::vector<T>& elements, std::function<void(const T& element)> callback); template<typename T> THREADINGZEUG_API void parallel_for(std::vector<T>& elements, std::function<void(T& element)> callback); THREADINGZEUG_API void parallel_for(int start, int end, std::function<void(int i)> callback); template<typename T> THREADINGZEUG_API void sequential_for(const std::vector<T>& elements, std::function<void(const T& element)> callback); template<typename T> THREADINGZEUG_API void sequential_for(std::vector<T>& elements, std::function<void(T& element)> callback); THREADINGZEUG_API void sequential_for(int start, int end, std::function<void(int i)> callback); } // namespace threadingzeug #include <threadingzeug/parallelfor.hpp>
#pragma once #include <functional> #include <vector> #include <threadingzeug/threadingzeug.h> namespace threadingzeug { template<typename T> void parallel_for(const std::vector<T>& elements, std::function<void(const T& element)> callback); template<typename T> void parallel_for(std::vector<T>& elements, std::function<void(T& element)> callback); THREADINGZEUG_API void parallel_for(int start, int end, std::function<void(int i)> callback); template<typename T> void sequential_for(const std::vector<T>& elements, std::function<void(const T& element)> callback); template<typename T> void sequential_for(std::vector<T>& elements, std::function<void(T& element)> callback); THREADINGZEUG_API void sequential_for(int start, int end, std::function<void(int i)> callback); } // namespace threadingzeug #include <threadingzeug/parallelfor.hpp>
Fix compile warning on Windows: C4273: 'threadingzeug::parallel_for' : inconsistent dll linkage
Fix compile warning on Windows: C4273: 'threadingzeug::parallel_for' : inconsistent dll linkage
C
mit
lanice/libzeug,mjendruk/libzeug,cginternals/libzeug,simonkrogmann/libzeug,hpi-r2d2/libzeug,j-o/libzeug,mjendruk/libzeug,p-otto/libzeug,kateyy/libzeug,hpi-r2d2/libzeug,mjendruk/libzeug,cginternals/libzeug,simonkrogmann/libzeug,p-otto/libzeug,lanice/libzeug,cginternals/libzeug,j-o/libzeug,lanice/libzeug,j-o/libzeug,kateyy/libzeug,cginternals/libzeug,p-otto/libzeug,lanice/libzeug,j-o/libzeug,kateyy/libzeug
807d73e3f1ae1cf89d5c000d8070c9e43d80b453
sample/sample.c
sample/sample.c
#define MODULE sample #include <sqmodule.h> #include <stdio.h> DECLARE_SQAPI static SQInteger func(HSQUIRRELVM v) { static char s[] = "Hello, modules!"; SQAPI(pushstring)(v, s, sizeof(s) - 1); return 1; } // Module init function SQRESULT MODULE_INIT(HSQUIRRELVM v, HSQAPI api) { printf("in sqmodule_load\n"); INIT_SQAPI(api); SQAPI(pushstring)(v, _SC("func"), -1); SQAPI(newclosure)(v, func, 0); SQAPI(newslot)(v, -3, SQFalse); printf("out sqmodule_load\n"); return SQ_OK; }
#define MODULE sample #include <sqmodule.h> #include <stdio.h> DECLARE_SQAPI static SQInteger func(HSQUIRRELVM v) { static char s[] = "Hello, modules!"; SQAPI(pushstring)(v, s, sizeof(s) - 1); return 1; } // Module init function SQRESULT MODULE_INIT(HSQUIRRELVM v, HSQAPI api) { printf("in sqmodule_load\n"); INIT_SQAPI(v, api); SQAPI(pushstring)(v, _SC("func"), -1); SQAPI(newclosure)(v, func, 0); SQAPI(newslot)(v, -3, SQFalse); printf("out sqmodule_load\n"); return SQ_OK; }
Update for sqmodule API change.
Update for sqmodule API change.
C
mit
pfalcon/squirrel-modules,pfalcon/squirrel-modules,pfalcon/squirrel-modules
8ef5102c2ad6f1c0cd8098cdf45473d49f62e8de
searchlib/src/vespa/searchlib/memoryindex/posting_list_entry.h
searchlib/src/vespa/searchlib/memoryindex/posting_list_entry.h
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # pragma once #include <vespa/vespalib/datastore/entryref.h> namespace search::memoryindex { /** * Entry per document in memory index posting list. */ class PostingListEntry { mutable datastore::EntryRef _features; // reference to compressed features public: PostingListEntry(datastore::EntryRef features) : _features(features) { } PostingListEntry() : _features() { } datastore::EntryRef get_features() const { return _features; } // Reference moved data (used when compacting FeatureStore) void update_features(datastore::EntryRef features) const { _features = features; } }; }
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # pragma once #include <vespa/vespalib/datastore/entryref.h> namespace search::memoryindex { /** * Entry per document in memory index posting list. */ class PostingListEntry { mutable datastore::EntryRef _features; // reference to compressed features public: PostingListEntry(datastore::EntryRef features) : _features(features) { } PostingListEntry() : _features() { } datastore::EntryRef get_features() const { return _features; } /* * Reference moved features (used when compacting FeatureStore). * The moved features must have the same content as the original * features. */ void update_features(datastore::EntryRef features) const { _features = features; } }; }
Fix indentation and update comment.
Fix indentation and update comment.
C
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
903afa33c486e3f00be40b431fb2919a6e10364b
hal/common/mbed_error.c
hal/common/mbed_error.c
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * 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 <stdlib.h> #include <stdarg.h> #include "device.h" #include "toolchain.h" #include "mbed_error.h" #include "mbed_interface.h" #if DEVICE_STDIO_MESSAGES #include <stdio.h> #endif WEAK void error(const char* format, ...) { va_list arg; va_start(arg, format); mbed_error_vfprintf(format, arg); va_end(arg); exit(1); }
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * 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 <stdlib.h> #include <stdarg.h> #include "device.h" #include "toolchain.h" #include "mbed_error.h" #include "mbed_interface.h" #if DEVICE_STDIO_MESSAGES #include <stdio.h> #endif WEAK void error(const char* format, ...) { #ifndef NDEBUG va_list arg; va_start(arg, format); mbed_error_vfprintf(format, arg); va_end(arg); #endif exit(1); }
Allow the trace output by mbed error to be conditional of NDEBUG.
Allow the trace output by mbed error to be conditional of NDEBUG. This change avoid inclusion of printf and friends code in a binary when it is compiled with the macro NDEBUG enabled (this macro is usually enabled for production builds). Unlike assert, the error function will still crash/halt the execution of the application even if NDEBUG is enabled; the traces are just not outputed.
C
apache-2.0
fanghuaqi/mbed,monkiineko/mbed-os,YarivCol/mbed-os,CalSol/mbed,adustm/mbed,mazimkhan/mbed-os,arostm/mbed-os,karsev/mbed-os,NXPmicro/mbed,theotherjimmy/mbed,svogl/mbed-os,mikaleppanen/mbed-os,nRFMesh/mbed-os,netzimme/mbed-os,svogl/mbed-os,andcor02/mbed-os,bcostm/mbed-os,RonEld/mbed,catiedev/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,adamgreen/mbed,mazimkhan/mbed-os,arostm/mbed-os,betzw/mbed-os,mazimkhan/mbed-os,kjbracey-arm/mbed,maximmbed/mbed,cvtsi2sd/mbed-os,ryankurte/mbed-os,c1728p9/mbed-os,mbedmicro/mbed,mmorenobarm/mbed-os,theotherjimmy/mbed,adustm/mbed,mikaleppanen/mbed-os,adamgreen/mbed,bcostm/mbed-os,HeadsUpDisplayInc/mbed,nvlsianpu/mbed,kl-cruz/mbed-os,mazimkhan/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,nvlsianpu/mbed,catiedev/mbed-os,bulislaw/mbed-os,cvtsi2sd/mbed-os,mikaleppanen/mbed-os,maximmbed/mbed,karsev/mbed-os,Archcady/mbed-os,ryankurte/mbed-os,svogl/mbed-os,j-greffe/mbed-os,ryankurte/mbed-os,kl-cruz/mbed-os,nvlsianpu/mbed,bulislaw/mbed-os,kl-cruz/mbed-os,adustm/mbed,CalSol/mbed,screamerbg/mbed,pradeep-gr/mbed-os5-onsemi,ryankurte/mbed-os,RonEld/mbed,Archcady/mbed-os,theotherjimmy/mbed,netzimme/mbed-os,mazimkhan/mbed-os,fanghuaqi/mbed,ryankurte/mbed-os,mmorenobarm/mbed-os,Archcady/mbed-os,fanghuaqi/mbed,bcostm/mbed-os,fahhem/mbed-os,pradeep-gr/mbed-os5-onsemi,mbedmicro/mbed,c1728p9/mbed-os,NXPmicro/mbed,arostm/mbed-os,bulislaw/mbed-os,nRFMesh/mbed-os,ryankurte/mbed-os,maximmbed/mbed,betzw/mbed-os,adamgreen/mbed,kjbracey-arm/mbed,mikaleppanen/mbed-os,adustm/mbed,andcor02/mbed-os,fahhem/mbed-os,karsev/mbed-os,netzimme/mbed-os,svogl/mbed-os,cvtsi2sd/mbed-os,j-greffe/mbed-os,HeadsUpDisplayInc/mbed,screamerbg/mbed,maximmbed/mbed,YarivCol/mbed-os,screamerbg/mbed,cvtsi2sd/mbed-os,andcor02/mbed-os,adamgreen/mbed,maximmbed/mbed,bcostm/mbed-os,Archcady/mbed-os,monkiineko/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,andcor02/mbed-os,YarivCol/mbed-os,nRFMesh/mbed-os,j-greffe/mbed-os,NXPmicro/mbed,CalSol/mbed,maximmbed/mbed,adamgreen/mbed,karsev/mbed-os,catiedev/mbed-os,svogl/mbed-os,andcor02/mbed-os,karsev/mbed-os,RonEld/mbed,Archcady/mbed-os,kl-cruz/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,fahhem/mbed-os,infinnovation/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,nRFMesh/mbed-os,catiedev/mbed-os,pradeep-gr/mbed-os5-onsemi,CalSol/mbed,mbedmicro/mbed,bcostm/mbed-os,andcor02/mbed-os,infinnovation/mbed-os,mazimkhan/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os,YarivCol/mbed-os,screamerbg/mbed,mikaleppanen/mbed-os,kjbracey-arm/mbed,betzw/mbed-os,adustm/mbed,mmorenobarm/mbed-os,mmorenobarm/mbed-os,bcostm/mbed-os,monkiineko/mbed-os,betzw/mbed-os,screamerbg/mbed,adamgreen/mbed,mbedmicro/mbed,catiedev/mbed-os,nvlsianpu/mbed,netzimme/mbed-os,NXPmicro/mbed,HeadsUpDisplayInc/mbed,YarivCol/mbed-os,YarivCol/mbed-os,monkiineko/mbed-os,c1728p9/mbed-os,mmorenobarm/mbed-os,mbedmicro/mbed,theotherjimmy/mbed,arostm/mbed-os,kl-cruz/mbed-os,screamerbg/mbed,fahhem/mbed-os,fahhem/mbed-os,svogl/mbed-os,theotherjimmy/mbed,HeadsUpDisplayInc/mbed,RonEld/mbed,j-greffe/mbed-os,c1728p9/mbed-os,pradeep-gr/mbed-os5-onsemi,pradeep-gr/mbed-os5-onsemi,betzw/mbed-os,nRFMesh/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,catiedev/mbed-os,nvlsianpu/mbed,Archcady/mbed-os,HeadsUpDisplayInc/mbed,kl-cruz/mbed-os,arostm/mbed-os,netzimme/mbed-os,infinnovation/mbed-os,monkiineko/mbed-os,theotherjimmy/mbed,pradeep-gr/mbed-os5-onsemi,bulislaw/mbed-os,NXPmicro/mbed,CalSol/mbed,adustm/mbed,fahhem/mbed-os,infinnovation/mbed-os,bulislaw/mbed-os,mmorenobarm/mbed-os,infinnovation/mbed-os,NXPmicro/mbed,monkiineko/mbed-os,infinnovation/mbed-os,karsev/mbed-os,nvlsianpu/mbed,cvtsi2sd/mbed-os,betzw/mbed-os,RonEld/mbed,nRFMesh/mbed-os,cvtsi2sd/mbed-os,c1728p9/mbed-os,arostm/mbed-os,j-greffe/mbed-os,HeadsUpDisplayInc/mbed,bulislaw/mbed-os,fanghuaqi/mbed,fanghuaqi/mbed,RonEld/mbed,mikaleppanen/mbed-os,netzimme/mbed-os,j-greffe/mbed-os,CalSol/mbed
5f2d956f85e538af7c4b031f6b3f7e35d7a3638f
Support/ResponseDetective.h
Support/ResponseDetective.h
// // ResponseDetective.h // // Copyright (c) 2016 Netguru Sp. z o.o. All rights reserved. // Licensed under the MIT License. // /// Project version number for ResponseDetective. extern double ResponseDetectiveVersionNumber; /// Project version string for ResponseDetective. extern const unsigned char ResponseDetectiveVersionString[]; #import <ResponseDetective/RDTBodyDeserializer.h> #import <ResponseDetective/RDTXMLBodyDeserializer.h> #import <ResponseDetective/RDTHTMLBodyDeserializer.h>
// // ResponseDetective.h // // Copyright (c) 2016 Netguru Sp. z o.o. All rights reserved. // Licensed under the MIT License. // /// Project version number for ResponseDetective. extern double ResponseDetectiveVersionNumber; /// Project version string for ResponseDetective. extern const unsigned char ResponseDetectiveVersionString[]; @import Foundation; #import <ResponseDetective/RDTBodyDeserializer.h> #import <ResponseDetective/RDTXMLBodyDeserializer.h> #import <ResponseDetective/RDTHTMLBodyDeserializer.h>
Add global foundation import to umbrella header
Add global foundation import to umbrella header
C
mit
netguru/ResponseDetective,netguru/ResponseDetective
cac90afd0859ca39008f774c88fcb5239de946fe
socket/Socket.h
socket/Socket.h
#ifndef _SOCKET_H_ #define _SOCKET_H_ namespace bittorrent { namespace socket { struct Buffer { Buffer(char *b, std::size_t bl) : buf(b), buflen(bl), used(0) { } char *buf; std::size_t buflen; std::size_t used; }; class BufferAllocator { public: static Buffer AllocBuf(std::size_t size); static void DeallocBuf(Buffer& buf); }; class Socket { public: Socket(); void Send(Buffer& buf); void Recv(Buffer& buf); }; class Acceptor { public: Acceptor(); }; } // namespace socket } // namespace bittorrent #endif // _SOCKET_H_
#ifndef _SOCKET_H_ #define _SOCKET_H_ #include <WinSock2.h> #include <cstddef> namespace bittorrent { namespace socket { struct Buffer { Buffer(char *b, std::size_t bl) : buf(b), buflen(bl), used(0) { } char *buf; std::size_t buflen; std::size_t used; }; class BufferAllocator { public: static Buffer AllocBuf(std::size_t size); static void DeallocBuf(Buffer& buf); }; class Address { public: static const long any = INADDR_ANY; Address(); Address(long hladdress); Address(const char *address); operator long () const { return address_; } private: long address_; }; class Port { public: Port(short hsport); operator short () const { return port_; } private: short port_; }; class IoService; class Socket { public: Socket(); void Connect(const Address& address, const Port& port); void Send(Buffer& buf); void Recv(Buffer& buf); void Close(); SOCKET GetRawSock() const; private: SOCKET sock_; IoService *service_; }; class Acceptor { public: Acceptor(const Address& address, const Port& port); void Accept(Socket& sock); void Close(); SOCKET GetRawSock() const; private: SOCKET sock_; IoService *service_; }; class IoService { public: typedef HANDLE ServiceHandle; IoService(); void Send(Socket *socket, Buffer& buf); void Recv(Socket *socket, Buffer& buf); void Connect(Socket *socket, const sockaddr *name); void Accept(Acceptor *acceptor, Socket& socket); private: ServiceHandle handle_; }; } // namespace socket } // namespace bittorrent #endif // _SOCKET_H_
Add Address, Port and IoService classes in namespace socket, and complete classes' declaration.
Add Address, Port and IoService classes in namespace socket, and complete classes' declaration.
C
bsd-2-clause
airtrack/bitwave,airtrack/bitwave
38a4089a9ef17f3185cb6ec4506f0734b53eabea
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k4"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k5"
Update driver version to 5.03.00-k5
[SCSI] qla4xxx: Update driver version to 5.03.00-k5 Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com> Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs
72da7bcd68b38501b1e5b4c7bffab7a1093c5a40
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k3"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k4"
Update driver version to 5.03.00-k4
[SCSI] qla4xxx: Update driver version to 5.03.00-k4 Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com> Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
3eb59f9875a3874df94e26371dd7ab29a26efc52
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k8"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k9"
Update driver version to 5.03.00-k9
[SCSI] qla4xxx: Update driver version to 5.03.00-k9 Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com> Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
4c9654096e1e6d9cb1bf4574432a992ecdc24117
src/registers.h
src/registers.h
/* * registers.h */ #ifndef REGISTERS_H #define REGISTERS_H #define REGSIZE 8 /* number of registers */ /* Program Registers */ #define EAX 0x0 #define ECX 0x1 #define EDX 0x2 #define EBX 0x3 #define ESP 0x4 #define EBP 0x5 #define ESI 0x6 #define EDI 0x7 #define RNONE 0xf /* i.e. - no register needed */ /* Condition Codes (CC) */ #define ZF 0x2 /* zero flag - bit 2 of the CC */ #define SF 0x1 /* sign flag - bit 1 of the CC */ #define OF 0x0 /* overflow flag - bit 0 of the CC */ void clearCC(void); void clearRegisters(void); unsigned int getCC(unsigned int bitNumber); unsigned int getRegister(int regNum); void setCC(unsigned int bitNumber, unsigned int value); void setRegister(int regNum, unsigned int regValue); #endif /* REGISTERS_H */
/* * registers.h */ #ifndef REGISTERS_H #define REGISTERS_H #define REGSIZE 8 /* number of registers */ /* Program Registers */ #define EAX 0x0 #define ECX 0x1 #define EDX 0x2 #define EBX 0x3 #define ESP 0x4 #define EBP 0x5 #define ESI 0x6 #define EDI 0x7 #define RNONE 0xf /* i.e. - no register needed */ /* Condition Codes (CC) */ /* * Set with each arithmetic/logical operation (OPL). * ZF: was the result 0? * SF: was the result < 0? * OF: did the result overflow? (2's complement) */ #define ZF 0x2 /* zero flag - bit 2 of the CC */ #define SF 0x1 /* sign flag - bit 1 of the CC */ #define OF 0x0 /* overflow flag - bit 0 of the CC */ void clearCC(void); void clearRegisters(void); unsigned int getCC(unsigned int bitNumber); unsigned int getRegister(int regNum); void setCC(unsigned int bitNumber, unsigned int value); void setRegister(int regNum, unsigned int regValue); #endif /* REGISTERS_H */
Add descriptions of the CC's
Add descriptions of the CC's
C
isc
sbennett1990/YESS,sbennett1990/YESS,sbennett1990/YESS
fcead07c6f0a7f919a2856257a37f9efd453c524
include/simbatch/batch.h
include/simbatch/batch.h
/****************************************************************************/ /* This file is part of the Simbatch project */ /* written by Jean-Sebastien Gay, ENS Lyon */ /* */ /* Copyright (c) 2007 Jean-Sebastien Gay. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the license (GNU LGPL) which comes with this package. */ /****************************************************************************/ #ifndef _BATCH_H_ #define _BATCH_H_ /* * Simulates the behavior of a Batch system * MSG_tasks to use when calling the function: * SB_TASK * SB_RES to make reservations * SB_ACK when a task has been done * SB_DIET when working with DIET * SED_PRED to perform a prediction of when the task will * be able to execute * SED_HPF * PF_INIT to initialize the batch */ int SB_batch(int argc, char ** argv); #endif
/****************************************************************************/ /* This file is part of the Simbatch project. */ /* written by Jean-Sebastien Gay and Ghislain Charrier, ENS Lyon. */ /* */ /* Copyright (c) 2007, Simbatch Team. All rights reserved. */ /* */ /* This program is free software; you can redistribute it and/or modify it */ /* under the terms of the license (GNU LGPL) which comes with this package. */ /****************************************************************************/ #ifndef _BATCH_H_ #define _BATCH_H_ /** * \file batch.h * Define the batch process. */ /** * Simulates the behavior of a Batch system. * * The behaviour of the batch process consists in responding to incoming * messages and to schedule jobs sent by clients. Messages are MSG_task * datatype provided by the simgrid library. * * Here is a short description of the different tasks received: * SB_TASK conatins the job to schedule. * SB_RES to make reservations. * SB_ACK when a task has been done on a cpu. 5 cpus for a task => 5 SB_ACK. * SB_DIET to allow Diet for using Simbatch. * SED_PRED to perform a prediction of when the task will be able to execute. * SED_HPF (work in progess) * PF_INIT to initialize the batch * * \param argc number of parameters transmitted to the SB_batch process. * \param **argv array containing the parameters. argc and argc are * automacilly filled by simgrid when parsing the deployment.xml file. * \return an error code. */ int SB_batch(int argc, char **argv); #endif
Add documentation in doxygen style (use JAVA_BRIEF)
Add documentation in doxygen style (use JAVA_BRIEF) git-svn-id: 20e1f66da029c194d4fbd4305fcdc34286e936b0@6168 48e7efb5-ca39-0410-a469-dd3cf9ba447f
C
lgpl-2.1
frs69wq/Simbatch,frs69wq/Simbatch,frs69wq/Simbatch,frs69wq/Simbatch
1760bba625b57fbe10b6c0ec8585e0c54c90b907
includes/values.h
includes/values.h
#ifndef __VALUES_H__ # define __VALUES_H__ #include "mpc.h" typedef struct { int type; long num; /* Error and Symbol types have some string data */ char* err; char* sym; /* Count and Pointer to a list of "lval*" */ int count; struct lval** cell; } lval; /* Create Enumeration of Possible lval Types */ enum { LVAL_ERR, LVAL_NUM, LVAL_SYM, LVAL_SEXPR }; /* Create Enumeration of Possible Error Types */ enum { LERR_DIV_ZERO, LERR_BAD_OP, LERR_BAD_NUM }; lval* lval_num(long); lval* lval_err(char*); lval* lval_sym(char*); lval* lval_sexpr(void); lval* lval_add(lval*, struct lval*); void lval_del(lval*); lval* lval_read_num(mpc_ast_t*); lval* lval_read(mpc_ast_t*); void lval_expr_print(lval*, char, char); void lval_print(lval*); void lval_println(lval*); #endif
#ifndef __VALUES_H__ # define __VALUES_H__ #include "mpc.h" typedef struct s_lval { int type; long num; /* Error and Symbol types have some string data */ char* err; char* sym; /* Count and Pointer to a list of "lval*" */ int count; struct s_lval** cell; } lval; /* Create Enumeration of Possible lval Types */ enum { LVAL_ERR, LVAL_NUM, LVAL_SYM, LVAL_SEXPR }; /* Create Enumeration of Possible Error Types */ enum { LERR_DIV_ZERO, LERR_BAD_OP, LERR_BAD_NUM }; lval* lval_num(long); lval* lval_err(char*); lval* lval_sym(char*); lval* lval_sexpr(void); lval* lval_add(lval*, struct lval*); void lval_del(lval*); lval* lval_read_num(mpc_ast_t*); lval* lval_read(mpc_ast_t*); void lval_expr_print(lval*, char, char); void lval_print(lval*); void lval_println(lval*); #endif
Fix forward lval struct declaration
Fix forward lval struct declaration
C
mit
oleiade/lipstick
75219476c5d5c5f418075dfe35e033fea95e7787
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 BTM_WBS_INCLUDED TRUE #define BTIF_HF_WBS_PREFERRED TRUE #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_WBS_INCLUDED TRUE #define BTIF_HF_WBS_PREFERRED TRUE #define BLE_VND_INCLUDED TRUE #endif
Use run time parameters to control LE features
Use run time parameters to control LE features Use values read from controller to enable and control LE features such as multi advertising, RPA offload, maximum irk size etc bug 15393216
C
apache-2.0
maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead
ed02ba882c16165e6d7241e4b59cb9bacd653a4e
milestone2/1.c
milestone2/1.c
extern void print_int(int x); extern void print_string(char c[]); int x; char c; void main(void){ // check signed-ness of char -> int conversion x = -1; c = x; print_string("should get -1\ngot: "); print_int(c); print_string("\n\n"); x = -2147483647; print_string("should get -2147483647\ngot: "); print_int(x); print_string("\n\n"); // check signed-ness of char -> int conversion x = -2147483648; print_string("should get -2147483648\ngot: "); print_int(x); print_string("\n\n"); }
extern void print_int(int x); extern void print_string(char c[]); int x; char c; void main(void){ /* check signed-ness of char -> int conversion */ x = -1; c = x; print_string("should get -1\ngot: "); print_int(c); print_string("\n\n"); x = -2147483647; print_string("should get -2147483647\ngot: "); print_int(x); print_string("\n\n"); /* check signed-ness of char -> int conversion */ x = -2147483648; print_string("should get -2147483648\ngot: "); print_int(x); print_string("\n\n"); }
Edit comments so they align with our C-- spec
Edit comments so they align with our C-- spec
C
unlicense
mgaut72/cmm-examples,mgaut72/cmm-examples
00b0796e07fdb5817ed880fe622c15f0ab549a0b
MdePkg/Include/Protocol/MonotonicCounter.h
MdePkg/Include/Protocol/MonotonicCounter.h
/** @file Monotonic Counter Architectural Protocol as defined in PI SPEC VOLUME 2 DXE This code provides the services required to access the systems monotonic counter Copyright (c) 2006 - 2008, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef __ARCH_PROTOCOL_MONTONIC_COUNTER_H__ #define __ARCH_PROTOCOL_MONTONIC_COUNTER_H__ /// /// Global ID for the Monotonic Counter Architectural Protocol /// #define EFI_MONTONIC_COUNTER_ARCH_PROTOCOL_GUID \ {0x1da97072, 0xbddc, 0x4b30, {0x99, 0xf1, 0x72, 0xa0, 0xb5, 0x6f, 0xff, 0x2a} } extern EFI_GUID gEfiMonotonicCounterArchProtocolGuid; #endif
/** @file Monotonic Counter Architectural Protocol as defined in PI SPEC VOLUME 2 DXE This code provides the services required to access the systems monotonic counter Copyright (c) 2006 - 2010, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef __ARCH_PROTOCOL_MONTONIC_COUNTER_H__ #define __ARCH_PROTOCOL_MONTONIC_COUNTER_H__ /// /// Global ID for the Monotonic Counter Architectural Protocol /// #define EFI_MONOTONIC_COUNTER_ARCH_PROTOCOL_GUID \ {0x1da97072, 0xbddc, 0x4b30, {0x99, 0xf1, 0x72, 0xa0, 0xb5, 0x6f, 0xff, 0x2a} } extern EFI_GUID gEfiMonotonicCounterArchProtocolGuid; #endif
Fix typo in Monotonic Counter GUID macro name
Fix typo in Monotonic Counter GUID macro name git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@9806 6f19259b-4bc3-4df7-8a09-765794883524
C
bsd-2-clause
MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2
0302e97ebcbb18c9b0bd97ac6641f4b79c401bd0
libs/fst/config.h
libs/fst/config.h
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */ #define HAVE_ALLOCA_H 1 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `pthread' library (-lpthread). */ #define HAVE_LIBPTHREAD 1 /* Define to 1 if you have the `realpath' function. */ #define HAVE_REALPATH 1 #if defined(__MINGW32__) #undef HAVE_ALLOCA_H #undef HAVE_REALPATH #endif #if defined(_MSC_VER) #undef HAVE_ALLOCA_H #undef HAVE_REALPATH #undef HAVE_LIBPTHREAD #undef HAVE_FSEEKO #endif # ifndef __STDC_FORMAT_MACROS # define __STDC_FORMAT_MACROS 1 # endif
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */ #define HAVE_ALLOCA_H 1 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `pthread' library (-lpthread). */ #define HAVE_LIBPTHREAD 1 /* Define to 1 if you have the `realpath' function. */ #define HAVE_REALPATH 1 #if defined(__MINGW32__) #undef HAVE_ALLOCA_H #undef HAVE_REALPATH #endif #if defined(_MSC_VER) #undef HAVE_ALLOCA_H #undef HAVE_REALPATH #undef HAVE_LIBPTHREAD #undef HAVE_FSEEKO #endif #ifdef __FreeBSD__ #undef HAVE_ALLOCA_H #endif # ifndef __STDC_FORMAT_MACROS # define __STDC_FORMAT_MACROS 1 # endif
Fix build on FreeBSD, which has no alloca.h
Fix build on FreeBSD, which has no alloca.h
C
isc
YosysHQ/yosys,YosysHQ/yosys,YosysHQ/yosys,YosysHQ/yosys,YosysHQ/yosys,YosysHQ/yosys,YosysHQ/yosys,YosysHQ/yosys
97a1b20724963af57de4e08b4baf17e8243ba4d5
src/datablocks/kreborder.h
src/datablocks/kreborder.h
/*************************************************************************** * Copyright © 2004 Jason Kivlighn <jkivlighn@gmail.com> * * * * 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. * ***************************************************************************/ #ifndef KREBORDER_H #define KREBORDER_H #include <QColor> #include <QString> //typedef enum KreBorderStyle { None = 0, Dotted, Dashed, Solid, Double, Groove, Ridge, Inset, Outset }; class KreBorder { public: KreBorder( int w = 1, const QString & s = "none", const QColor &c = Qt::black ); int width; QString style; QColor color; }; #endif //KREBORDER_H
/*************************************************************************** * Copyright © 2004 Jason Kivlighn <jkivlighn@gmail.com> * * * * 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. * ***************************************************************************/ #ifndef KREBORDER_H #define KREBORDER_H #include <QColor> #include <QString> //typedef enum KreBorderStyle { None = 0, Dotted, Dashed, Solid, Double, Groove, Ridge, Inset, Outset }; class KreBorder { public: explicit KreBorder( int w = 1, const QString & s = "none", const QColor &c = Qt::black ); int width; QString style; QColor color; }; #endif //KREBORDER_H
Fix Krazy warnings: explicit - KreBorder
Fix Krazy warnings: explicit - KreBorder svn path=/trunk/extragear/utils/krecipes/; revision=1119814
C
lgpl-2.1
eliovir/krecipes,eliovir/krecipes,eliovir/krecipes,eliovir/krecipes
3fd3731b09766f04091941d7bf5ffab824394a0d
sift/recorder/threads.h
sift/recorder/threads.h
#ifndef __THREAD_INFO_H #define __THREAD_INFO_H #include "globals.h" #include "sift_writer.h" #include "bbv_count.h" #include "pin.H" #include <deque> typedef struct { Sift::Writer *output; std::deque<ADDRINT> *dyn_address_queue; Bbv *bbv; UINT64 thread_num; ADDRINT bbv_base; UINT64 bbv_count; ADDRINT bbv_last; BOOL bbv_end; UINT64 blocknum; UINT64 icount; UINT64 icount_detailed; UINT32 last_syscall_number; UINT32 last_syscall_returnval; UINT64 flowcontrol_target; ADDRINT tid_ptr; ADDRINT last_routine; BOOL last_syscall_emulated; BOOL running; #if defined(TARGET_IA32) uint8_t __pad[41]; #elif defined(TARGET_INTEL64) uint8_t __pad[13]; #endif } __attribute__((packed)) thread_data_t; extern thread_data_t *thread_data; void initThreads(); #endif // __THREAD_INFO_H
#ifndef __THREAD_INFO_H #define __THREAD_INFO_H #include "globals.h" #include "sift_writer.h" #include "bbv_count.h" #include "pin.H" #include <deque> typedef struct { Sift::Writer *output; std::deque<ADDRINT> *dyn_address_queue; Bbv *bbv; UINT64 thread_num; ADDRINT bbv_base; UINT64 bbv_count; ADDRINT bbv_last; BOOL bbv_end; UINT64 blocknum; UINT64 icount; UINT64 icount_detailed; ADDRINT last_syscall_number; ADDRINT last_syscall_returnval; UINT64 flowcontrol_target; ADDRINT tid_ptr; ADDRINT last_routine; BOOL last_syscall_emulated; BOOL running; #if defined(TARGET_IA32) uint8_t __pad[41]; #elif defined(TARGET_INTEL64) uint8_t __pad[5]; #endif } __attribute__((packed)) thread_data_t; extern thread_data_t *thread_data; void initThreads(); #endif // __THREAD_INFO_H
Fix data type for syscall return value to be native word size (ADDRINT rather than INT32) so negative system call return values are passed back correctly
[sift] Fix data type for syscall return value to be native word size (ADDRINT rather than INT32) so negative system call return values are passed back correctly
C
mit
abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper
391385fc4ec94084cebabd40dde97217645bf274
src/lib/pk_pad/eme_oaep/oaep.h
src/lib/pk_pad/eme_oaep/oaep.h
/* * OAEP * (C) 1999-2007 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_OAEP_H_ #define BOTAN_OAEP_H_ #include <botan/eme.h> #include <botan/hash.h> namespace Botan { /** * OAEP (called EME1 in IEEE 1363 and in earlier versions of the library) */ class BOTAN_PUBLIC_API(2,0) OAEP final : public EME { public: size_t maximum_input_size(size_t) const override; /** * @param hash function to use for hashing (takes ownership) * @param P an optional label. Normally empty. */ OAEP(HashFunction* hash, const std::string& P = ""); private: secure_vector<uint8_t> pad(const uint8_t in[], size_t in_length, size_t key_length, RandomNumberGenerator& rng) const override; secure_vector<uint8_t> unpad(uint8_t& valid_mask, const uint8_t in[], size_t in_len) const override; secure_vector<uint8_t> m_Phash; std::unique_ptr<HashFunction> m_hash; }; } #endif
/* * OAEP * (C) 1999-2007 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_OAEP_H_ #define BOTAN_OAEP_H_ #include <botan/eme.h> #include <botan/hash.h> namespace Botan { /** * OAEP (called EME1 in IEEE 1363 and in earlier versions of the library) * as specified in PKCS#1 v2.0 (RFC 2437) */ class BOTAN_PUBLIC_API(2,0) OAEP final : public EME { public: size_t maximum_input_size(size_t) const override; /** * @param hash function to use for hashing (takes ownership) * @param P an optional label. Normally empty. */ OAEP(HashFunction* hash, const std::string& P = ""); private: secure_vector<uint8_t> pad(const uint8_t in[], size_t in_length, size_t key_length, RandomNumberGenerator& rng) const override; secure_vector<uint8_t> unpad(uint8_t& valid_mask, const uint8_t in[], size_t in_len) const override; secure_vector<uint8_t> m_Phash; std::unique_ptr<HashFunction> m_hash; }; } #endif
Add note on OAEP version implemented
Add note on OAEP version implemented [ci skip]
C
bsd-2-clause
randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan
6972c7b3cb1c3b4e58b4205e221cdce2e0dfee68
include/HubFramework/HUBComponentCategories.h
include/HubFramework/HUBComponentCategories.h
#import <Foundation/Foundation.h> /** * Type for objects that describe a component category to use for fallbacks using `HUBComponentFallbackHandler` * * An application using the Hub Framework can declare any number of categories to use when performing fallback logic * for components, in case an unknown component namespace/name combo was encountered. * * Ideally, a component category should be generic enough to apply to a range of components with similar visuals and * behavior, but still contain enough information for a `HUBComponentFallbackHandler` to create appropriate fallback * components based on them. */ typedef NSObject<NSCopying, NSCoding> HUBComponentCategory; /// Category for components that have a row-like appearance, with a full screen width and a compact height static HUBComponentCategory * const HUBComponentCategoryRow = @"row"; /// Category for components that have a card-like appearance, that are placable in a grid with compact width & height static HUBComponentCategory * const HUBComponentCategoryCard = @"card"; /// Category for components that have a carousel-like apperance, with a swipeable horizontal set of child components static HUBComponentCategory * const HUBComponentCategoryCarousel = @"carousel";
#import <Foundation/Foundation.h> /** * Type for objects that describe a component category to use for fallbacks using `HUBComponentFallbackHandler` * * An application using the Hub Framework can declare any number of categories to use when performing fallback logic * for components, in case an unknown component namespace/name combo was encountered. * * Ideally, a component category should be generic enough to apply to a range of components with similar visuals and * behavior, but still contain enough information for a `HUBComponentFallbackHandler` to create appropriate fallback * components based on them. */ typedef NSObject<NSCopying, NSCoding> HUBComponentCategory; /// Category for components that have a row-like appearance, with a full screen width and a compact height static HUBComponentCategory * const HUBComponentCategoryRow = @"row"; /// Category for components that have a card-like appearance, that are placable in a grid with compact width & height static HUBComponentCategory * const HUBComponentCategoryCard = @"card"; /// Category for components that have a carousel-like apperance, with a swipeable horizontal set of child components static HUBComponentCategory * const HUBComponentCategoryCarousel = @"carousel"; /// Category for components that have a banner-like appearance, imagery-heavy with a full screen width and compact height static HUBComponentCategory * const HUBComponentCategoryBanner = @"banner";
Add component category for banners
Add component category for banners Needed for components like billboards, promotions etc that are neither cards or rows.
C
apache-2.0
spotify/HubFramework,spotify/HubFramework,spotify/HubFramework,spotify/HubFramework
329ca68e8c93524d269611d301a4dea908bb33d3
test/ClangModules/Inputs/custom-modules/ObjCImplicitProperties.h
test/ClangModules/Inputs/custom-modules/ObjCImplicitProperties.h
__attribute__((objc_root_class)) @interface ImplicitProperties - (id)implicitProperty; - (void)setImplicitProperty:(id)implicitProperty; - (void)setAnotherImplicitProperty:(int)implicitProperty; - (int)anotherImplicitProperty; @end __attribute__((objc_root_class)) @interface BadImplicitProperties - (int)nonVoidReturn; - (int)setNonVoidReturn:(int)val; - (void)setNonMatchingType:(id)val; - (int)nonMatchingType; - (int)wrongGetterArgs:(int)val; - (void)setWrongGetterArgs:(int)val; - (void)setWrongSetterArgs:(int)val extra:(int)another; - (int)wrongSetterArgs; - (int)wrongSetterArgs2; - (void)setWrongSetterArgs2; - (int)getterOnly; - (void)setSetterOnly:(int)val; @end
__attribute__((objc_root_class)) @interface ImplicitProperties - (id)implicitProperty; - (void)setImplicitProperty:(id)implicitProperty; - (void)setAnotherImplicitProperty:(int)implicitProperty; - (int)anotherImplicitProperty; @end __attribute__((objc_root_class)) @interface BadImplicitProperties - (int)nonVoidReturn; - (int)setNonVoidReturn:(int)val; - (void)setNonMatchingType:(id)val; - (int)nonMatchingType; - (int)wrongGetterArgs:(int)val; - (void)setWrongGetterArgs:(int)val; - (void)setWrongSetterArgs:(int)val extra:(int)another; - (int)wrongSetterArgs; - (int)wrongSetterArgs2; - (void)setWrongSetterArgs2; - (int)getterOnly; - (void)setSetterOnly:(int)val; @end @protocol PropertiesProto - (id)methodInProto; @property id propertyInProto; @end __attribute__((objc_root_class)) @interface Base <PropertiesProto> - (id)methodInBase; @property(readonly) id propertyInBase; - (id)methodPairInBase; - (void)setMethodPairInBase:(id)value; - (id)getterOnlyInBase; - (void)setSetterOnlyInBase:(id)value; @property id methodInProto; - (id)propertyInProto; - (id)methodInBaseButPropertyInProto; @property id propertyInBaseButMethodInProto; @end @protocol SubProto - (id)propertyInBaseButMethodInProto; @property id methodInBaseButPropertyInProto; @end @interface Sub : Base <SubProto> @property id methodInBase; - (id)propertyInBase; - (void)setMethodPairInBase:(id)value; - (id)getterOnlyInBase; - (void)setGetterOnlyInBase:(id)value; - (id)setterOnlyInBase; @end
Add some more tests for mixing methods and properties.
[ClangImporter] Add some more tests for mixing methods and properties. The rule right now is basically "the class is most important, followed by the superclass, followed by protocols", which I think is the right rule. As long as we aren't required to /check/ the conformance to an Objective-C protocol, we should be fine. Swift SVN r16036
C
apache-2.0
russbishop/swift,calebd/swift,zisko/swift,dduan/swift,rudkx/swift,slavapestov/swift,slavapestov/swift,Jnosh/swift,amraboelela/swift,xwu/swift,shajrawi/swift,alblue/swift,devincoughlin/swift,LeoShimonaka/swift,tjw/swift,mightydeveloper/swift,sdulal/swift,hooman/swift,jtbandes/swift,jckarter/swift,tardieu/swift,practicalswift/swift,sschiau/swift,brentdax/swift,jtbandes/swift,kusl/swift,jmgc/swift,kstaring/swift,lorentey/swift,roambotics/swift,kperryua/swift,Ivacker/swift,CodaFi/swift,gribozavr/swift,xwu/swift,kentya6/swift,huonw/swift,uasys/swift,russbishop/swift,xwu/swift,milseman/swift,natecook1000/swift,rudkx/swift,tjw/swift,frootloops/swift,natecook1000/swift,milseman/swift,kentya6/swift,shajrawi/swift,khizkhiz/swift,nathawes/swift,djwbrown/swift,KrishMunot/swift,gottesmm/swift,apple/swift,IngmarStein/swift,hooman/swift,JGiola/swift,calebd/swift,Ivacker/swift,parkera/swift,parkera/swift,bitjammer/swift,devincoughlin/swift,gribozavr/swift,gmilos/swift,SwiftAndroid/swift,rudkx/swift,jmgc/swift,russbishop/swift,ahoppen/swift,codestergit/swift,zisko/swift,bitjammer/swift,MukeshKumarS/Swift,calebd/swift,SwiftAndroid/swift,sdulal/swift,airspeedswift/swift,manavgabhawala/swift,sschiau/swift,stephentyrone/swift,alblue/swift,gregomni/swift,kperryua/swift,dduan/swift,shajrawi/swift,tinysun212/swift-windows,glessard/swift,therealbnut/swift,emilstahl/swift,KrishMunot/swift,Jnosh/swift,ben-ng/swift,austinzheng/swift,kusl/swift,allevato/swift,cbrentharris/swift,codestergit/swift,manavgabhawala/swift,atrick/swift,manavgabhawala/swift,stephentyrone/swift,johnno1962d/swift,airspeedswift/swift,harlanhaskins/swift,CodaFi/swift,MukeshKumarS/Swift,kusl/swift,CodaFi/swift,huonw/swift,SwiftAndroid/swift,ben-ng/swift,ahoppen/swift,glessard/swift,shajrawi/swift,aschwaighofer/swift,IngmarStein/swift,deyton/swift,russbishop/swift,johnno1962d/swift,ken0nek/swift,swiftix/swift,kentya6/swift,OscarSwanros/swift,dduan/swift,sschiau/swift,aschwaighofer/swift,lorentey/swift,deyton/swift,adrfer/swift,natecook1000/swift,tkremenek/swift,glessard/swift,allevato/swift,karwa/swift,milseman/swift,gmilos/swift,austinzheng/swift,gregomni/swift,danielmartin/swift,SwiftAndroid/swift,airspeedswift/swift,therealbnut/swift,apple/swift,LeoShimonaka/swift,gottesmm/swift,JGiola/swift,jckarter/swift,deyton/swift,kperryua/swift,jtbandes/swift,jopamer/swift,swiftix/swift.old,modocache/swift,CodaFi/swift,jtbandes/swift,shajrawi/swift,karwa/swift,swiftix/swift.old,jckarter/swift,apple/swift,tinysun212/swift-windows,kusl/swift,benlangmuir/swift,practicalswift/swift,allevato/swift,shahmishal/swift,KrishMunot/swift,practicalswift/swift,gottesmm/swift,devincoughlin/swift,shajrawi/swift,JaSpa/swift,gottesmm/swift,MukeshKumarS/Swift,devincoughlin/swift,codestergit/swift,brentdax/swift,apple/swift,tardieu/swift,parkera/swift,benlangmuir/swift,hooman/swift,kusl/swift,natecook1000/swift,parkera/swift,xwu/swift,codestergit/swift,karwa/swift,arvedviehweger/swift,emilstahl/swift,bitjammer/swift,hughbe/swift,brentdax/swift,djwbrown/swift,hooman/swift,hughbe/swift,harlanhaskins/swift,MukeshKumarS/Swift,jopamer/swift,karwa/swift,arvedviehweger/swift,IngmarStein/swift,dduan/swift,LeoShimonaka/swift,CodaFi/swift,deyton/swift,lorentey/swift,gribozavr/swift,kstaring/swift,hooman/swift,ahoppen/swift,tkremenek/swift,djwbrown/swift,natecook1000/swift,cbrentharris/swift,roambotics/swift,glessard/swift,LeoShimonaka/swift,therealbnut/swift,stephentyrone/swift,kusl/swift,JaSpa/swift,therealbnut/swift,atrick/swift,bitjammer/swift,MukeshKumarS/Swift,hooman/swift,bitjammer/swift,devincoughlin/swift,gottesmm/swift,ken0nek/swift,shahmishal/swift,kusl/swift,MukeshKumarS/Swift,cbrentharris/swift,manavgabhawala/swift,dduan/swift,danielmartin/swift,kentya6/swift,karwa/swift,zisko/swift,calebd/swift,tkremenek/swift,shajrawi/swift,felix91gr/swift,mightydeveloper/swift,manavgabhawala/swift,shahmishal/swift,felix91gr/swift,khizkhiz/swift,ben-ng/swift,sschiau/swift,tardieu/swift,practicalswift/swift,CodaFi/swift,harlanhaskins/swift,sdulal/swift,dduan/swift,JGiola/swift,kperryua/swift,swiftix/swift,slavapestov/swift,nathawes/swift,airspeedswift/swift,zisko/swift,deyton/swift,uasys/swift,russbishop/swift,swiftix/swift,therealbnut/swift,ken0nek/swift,emilstahl/swift,roambotics/swift,Ivacker/swift,austinzheng/swift,KrishMunot/swift,benlangmuir/swift,jopamer/swift,aschwaighofer/swift,OscarSwanros/swift,harlanhaskins/swift,modocache/swift,danielmartin/swift,huonw/swift,khizkhiz/swift,Ivacker/swift,frootloops/swift,emilstahl/swift,ken0nek/swift,xedin/swift,ken0nek/swift,alblue/swift,OscarSwanros/swift,tinysun212/swift-windows,aschwaighofer/swift,jmgc/swift,shahmishal/swift,slavapestov/swift,gmilos/swift,hughbe/swift,cbrentharris/swift,nathawes/swift,swiftix/swift.old,xedin/swift,amraboelela/swift,zisko/swift,ben-ng/swift,johnno1962d/swift,parkera/swift,atrick/swift,djwbrown/swift,felix91gr/swift,calebd/swift,kstaring/swift,tkremenek/swift,Jnosh/swift,mightydeveloper/swift,OscarSwanros/swift,swiftix/swift.old,djwbrown/swift,karwa/swift,stephentyrone/swift,aschwaighofer/swift,return/swift,sdulal/swift,huonw/swift,LeoShimonaka/swift,kusl/swift,gribozavr/swift,benlangmuir/swift,roambotics/swift,frootloops/swift,apple/swift,practicalswift/swift,hooman/swift,hughbe/swift,JaSpa/swift,IngmarStein/swift,tardieu/swift,arvedviehweger/swift,sschiau/swift,mightydeveloper/swift,jckarter/swift,harlanhaskins/swift,karwa/swift,glessard/swift,sdulal/swift,LeoShimonaka/swift,emilstahl/swift,zisko/swift,OscarSwanros/swift,sschiau/swift,return/swift,kstaring/swift,gmilos/swift,roambotics/swift,airspeedswift/swift,rudkx/swift,uasys/swift,felix91gr/swift,cbrentharris/swift,dreamsxin/swift,alblue/swift,tkremenek/swift,kperryua/swift,rudkx/swift,xedin/swift,gmilos/swift,adrfer/swift,bitjammer/swift,dreamsxin/swift,slavapestov/swift,devincoughlin/swift,allevato/swift,austinzheng/swift,calebd/swift,allevato/swift,amraboelela/swift,manavgabhawala/swift,gribozavr/swift,swiftix/swift,kstaring/swift,sschiau/swift,tinysun212/swift-windows,modocache/swift,therealbnut/swift,tardieu/swift,felix91gr/swift,jmgc/swift,gottesmm/swift,LeoShimonaka/swift,KrishMunot/swift,milseman/swift,return/swift,benlangmuir/swift,gribozavr/swift,aschwaighofer/swift,kstaring/swift,atrick/swift,danielmartin/swift,KrishMunot/swift,hughbe/swift,kentya6/swift,nathawes/swift,lorentey/swift,austinzheng/swift,JGiola/swift,bitjammer/swift,johnno1962d/swift,sdulal/swift,deyton/swift,harlanhaskins/swift,devincoughlin/swift,huonw/swift,danielmartin/swift,lorentey/swift,danielmartin/swift,arvedviehweger/swift,JaSpa/swift,ben-ng/swift,return/swift,modocache/swift,slavapestov/swift,kstaring/swift,kperryua/swift,sschiau/swift,jckarter/swift,kentya6/swift,SwiftAndroid/swift,jckarter/swift,LeoShimonaka/swift,tjw/swift,ben-ng/swift,ken0nek/swift,frootloops/swift,manavgabhawala/swift,return/swift,xedin/swift,djwbrown/swift,jopamer/swift,parkera/swift,emilstahl/swift,shahmishal/swift,jopamer/swift,xwu/swift,gregomni/swift,cbrentharris/swift,JaSpa/swift,SwiftAndroid/swift,jckarter/swift,ben-ng/swift,Ivacker/swift,ahoppen/swift,swiftix/swift.old,amraboelela/swift,frootloops/swift,uasys/swift,benlangmuir/swift,jtbandes/swift,khizkhiz/swift,return/swift,xedin/swift,parkera/swift,arvedviehweger/swift,tinysun212/swift-windows,jmgc/swift,mightydeveloper/swift,adrfer/swift,adrfer/swift,uasys/swift,lorentey/swift,atrick/swift,lorentey/swift,natecook1000/swift,gregomni/swift,Jnosh/swift,cbrentharris/swift,swiftix/swift,tardieu/swift,ahoppen/swift,tjw/swift,IngmarStein/swift,modocache/swift,nathawes/swift,russbishop/swift,mightydeveloper/swift,milseman/swift,brentdax/swift,amraboelela/swift,alblue/swift,glessard/swift,khizkhiz/swift,modocache/swift,kentya6/swift,Jnosh/swift,xedin/swift,cbrentharris/swift,mightydeveloper/swift,Jnosh/swift,stephentyrone/swift,gmilos/swift,harlanhaskins/swift,adrfer/swift,gribozavr/swift,djwbrown/swift,tjw/swift,xwu/swift,devincoughlin/swift,tjw/swift,KrishMunot/swift,JaSpa/swift,shahmishal/swift,kentya6/swift,adrfer/swift,allevato/swift,brentdax/swift,johnno1962d/swift,felix91gr/swift,amraboelela/swift,xwu/swift,allevato/swift,MukeshKumarS/Swift,IngmarStein/swift,arvedviehweger/swift,swiftix/swift,johnno1962d/swift,sdulal/swift,lorentey/swift,sdulal/swift,stephentyrone/swift,tardieu/swift,johnno1962d/swift,brentdax/swift,huonw/swift,tkremenek/swift,jopamer/swift,stephentyrone/swift,modocache/swift,huonw/swift,therealbnut/swift,frootloops/swift,SwiftAndroid/swift,jtbandes/swift,gottesmm/swift,codestergit/swift,Jnosh/swift,gregomni/swift,atrick/swift,emilstahl/swift,shahmishal/swift,airspeedswift/swift,gribozavr/swift,uasys/swift,natecook1000/swift,return/swift,practicalswift/swift,slavapestov/swift,OscarSwanros/swift,swiftix/swift.old,tinysun212/swift-windows,OscarSwanros/swift,hughbe/swift,shajrawi/swift,nathawes/swift,tinysun212/swift-windows,jopamer/swift,hughbe/swift,rudkx/swift,tkremenek/swift,JaSpa/swift,gregomni/swift,jmgc/swift,parkera/swift,swiftix/swift.old,austinzheng/swift,Ivacker/swift,practicalswift/swift,milseman/swift,Ivacker/swift,mightydeveloper/swift,CodaFi/swift,deyton/swift,xedin/swift,jtbandes/swift,arvedviehweger/swift,kperryua/swift,apple/swift,swiftix/swift,alblue/swift,JGiola/swift,Ivacker/swift,danielmartin/swift,dduan/swift,amraboelela/swift,nathawes/swift,khizkhiz/swift,aschwaighofer/swift,airspeedswift/swift,IngmarStein/swift,xedin/swift,JGiola/swift,roambotics/swift,austinzheng/swift,khizkhiz/swift,ahoppen/swift,gmilos/swift,calebd/swift,karwa/swift,adrfer/swift,uasys/swift,emilstahl/swift,codestergit/swift,swiftix/swift.old,frootloops/swift,codestergit/swift,ken0nek/swift,jmgc/swift,zisko/swift,alblue/swift,milseman/swift,tjw/swift,brentdax/swift,russbishop/swift,felix91gr/swift,practicalswift/swift,shahmishal/swift
a879a164495db6daa4d809fbaba1617c9ade5919
test/Driver/mips-long-double.c
test/Driver/mips-long-double.c
// RUN: %clang_cc1 -triple mips64-unknown-freebsd -std=c11 -verify %s // RUN: %clang_cc1 -triple mips-unknown-freebsd -std=c11 -verify %s // RUN: %clang_cc1 -triple mips-unknown-linux-std=c11 -verify %s // RUN: %clang_cc1 -triple mips64-unknown-linux-std=c11 -verify %s // expected-no-diagnostics #ifdef _ABI64 # ifdef __FreeBSD__ _Static_assert(sizeof(long double) == 8, "sizeof long double is wrong"); _Static_assert(_Alignof(long double) == 8, "alignof long double is wrong"); # else _Static_assert(sizeof(long double) == 16, "sizeof long double is wrong"); _Static_assert(_Alignof(long double) == 16, "alignof long double is wrong"); # endif #else _Static_assert(sizeof(long double) == 8, "sizeof long double is wrong"); _Static_assert(_Alignof(long double) == 8, "alignof long double is wrong"); #endif
// RUN: %clang_cc1 -triple mips64-unknown-freebsd -std=c11 -verify %s // RUN: %clang_cc1 -triple mips-unknown-freebsd -std=c11 -verify %s // RUN: %clang_cc1 -triple mips-unknown-linux -std=c11 -verify %s // RUN: %clang_cc1 -triple mips64-unknown-linux -std=c11 -verify %s // expected-no-diagnostics #ifdef _ABI64 # ifdef __FreeBSD__ _Static_assert(sizeof(long double) == 8, "sizeof long double is wrong"); _Static_assert(_Alignof(long double) == 8, "alignof long double is wrong"); # else _Static_assert(sizeof(long double) == 16, "sizeof long double is wrong"); _Static_assert(_Alignof(long double) == 16, "alignof long double is wrong"); # endif #else _Static_assert(sizeof(long double) == 8, "sizeof long double is wrong"); _Static_assert(_Alignof(long double) == 8, "alignof long double is wrong"); #endif
Add missing spaces. This doesn't cause problems in practice because we only warn about _Static_assert with -pedantic.
Add missing spaces. This doesn't cause problems in practice because we only warn about _Static_assert with -pedantic. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@171860 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
90de5eb32b7edd7107ad5ab7c083d55ee84bee83
include/core/SkMilestone.h
include/core/SkMilestone.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 107 #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 108 #endif
Update Skia milestone to 108
Update Skia milestone to 108 Change-Id: I9b44ccf2c942eefbb9992e0a130690c8d24116ac Reviewed-on: https://skia-review.googlesource.com/c/skia/+/581916 Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Auto-Submit: Rakshit Sharma <e91e6cdce3825eaad0fa11b55195605cfed87fab@google.com> Reviewed-by: Rakshit Sharma <e91e6cdce3825eaad0fa11b55195605cfed87fab@google.com> Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
C
bsd-3-clause
google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia
55662d5c57bbd169747d58cd26319062054a6303
kernel/core/main.c
kernel/core/main.c
#include <truth/cpu.h> #include <truth/types.h> #include <truth/log.h> #include <truth/physical_allocator.h> void kernel_main(void *multiboot_tables) { init_interrupts(); enum status unused(status) = init_log("log"); init_physical_allocator(multiboot_tables); logf("The Kernel of Truth\n\tVersion %d.%d.%d\n\tCommit %s\n", kernel_major, kernel_minor, kernel_patch, vcs_version); halt(); }
#include <truth/cpu.h> #include <truth/types.h> #include <truth/log.h> #include <truth/physical_allocator.h> void kernel_main(void *multiboot_tables) { init_interrupts(); enum status unused(status) = init_log("log"); init_physical_allocator(multiboot_tables); logf("The Kernel of Truth\n\tVersion %d.%d.%d\n\tCommit %s\n\t%s\n", kernel_major, kernel_minor, kernel_patch, vcs_version, project_website); halt(); }
Add project website to startup message
Add project website to startup message
C
mit
iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth
e2db3e62cfe0e413b0497a345c6d5bf03097974a
DOM/TKDOMMaker.h
DOM/TKDOMMaker.h
// // TKDOMProxyMaker.h // TumblKitNG // // Created by uasi on 09/10/31. // Copyright 2009 99cm.org. All rights reserved. // #import <Cocoa/Cocoa.h> #import <WebKit/WebKit.h> #import <ActorKit/ActorKit.h> // TKDOMMaker // // Make a DOMDocument from given URL synchronously // @interface TKDOMMaker : NSObject { NSMutableSet *workerPool_; } + (id)DOMMaker; // NOTE: // - Do NOT perform newDOMDocumentWithURLString on the main thread // - Returned DOMDocument MUST be released with releaseDOM: // - (DOMDocument *)newDOMDocumentWithURLString:(NSString *)URLString; - (void)releaseDOM:(id)object; @end
// // TKDOMProxyMaker.h // TumblKitNG // // Created by uasi on 09/10/31. // Copyright 2009 99cm.org. All rights reserved. // #import <Cocoa/Cocoa.h> #import <WebKit/WebKit.h> #import <ActorKit/ActorKit.h> // TKDOMMaker // // Make a DOMDocument from given URL synchronously // @interface TKDOMMaker : NSObject { } + (id)DOMMaker; // NOTE: // - Do NOT perform newDOMDocumentWithURLString on the main thread // - Returned DOMDocument MUST be released with releaseDOM: // - (DOMDocument *)newDOMDocumentWithURLString:(NSString *)URLString; - (void)releaseDOM:(id)object; @end
Remove unused instance variable 'workerPool_'
Remove unused instance variable 'workerPool_'
C
bsd-2-clause
uasi/tumblkit,uasi/tumblkit
9c0c3451a66ad78dad1c9394d38a2a3be2dc89df
src/helpers/TimingHelpers.h
src/helpers/TimingHelpers.h
/* Copyright (C) 2015 George White <stonehippo@gmail.com>, All rights reserved. See https://raw.githubusercontent.com/stonehippo/sploder/master/LICENSE.txt for license details. */ // ******************* Timing helpers ******************* void startTimer(long &timer) { timer = millis(); } boolean isTimerExpired(long &timer, int expiration) { long current = millis() - timer; return current > expiration; } void clearTimer(long &timer) { timer = 0; }
/* Copyright (C) 2015 George White <stonehippo@gmail.com>, All rights reserved. See https://raw.githubusercontent.com/stonehippo/sploder/master/LICENSE.txt for license details. */ // ******************* Timing helpers ******************* void startTimer(long &timer) { timer = millis(); } boolean isTimerExpired(long &timer, long expiration) { long current = millis() - timer; return current > expiration; } void clearTimer(long &timer) { timer = 0; }
Fix bug in timing helper
Fix bug in timing helper
C
mit
stonehippo/tankbot,stonehippo/tankbot
237c7004130c08be3ea1a06d0e5ac76b1a153e5a
peer_testing.h
peer_testing.h
#ifndef CJET_PEER_TESTING_H #define CJET_PEER_TESTING_H #ifdef TESTING #define READ \ fake_read #else #define READ \ read #endif #endif
#ifndef CJET_PEER_TESTING_H #define CJET_PEER_TESTING_H #ifdef TESTING #ifdef __cplusplus extern "C" { #endif ssize_t fake_read(int fd, void *buf, size_t count); #ifdef __cplusplus } #endif #define READ \ fake_read #else #define READ \ read #endif #endif
Add "extern C" stuff for clean compile of tests.
Add "extern C" stuff for clean compile of tests.
C
mit
mloy/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,gatzka/cjet,gatzka/cjet
2b7d5dd221477e233f77c8c729ee34f61600cfca
es-app/src/EmulationStation.h
es-app/src/EmulationStation.h
#pragma once // These numbers and strings need to be manually updated for a new version. // Do this version number update as the very last commit for the new release version. #define PROGRAM_VERSION_MAJOR 2 #define PROGRAM_VERSION_MINOR 0 #define PROGRAM_VERSION_MAINTENANCE 1 #define PROGRAM_VERSION_STRING "2.0.1a" #define PROGRAM_BUILT_STRING __DATE__ " - " __TIME__ #define RESOURCE_VERSION_STRING "2,0,1\0" #define RESOURCE_VERSION PROGRAM_VERSION_MAJOR,PROGRAM_VERSION_MINOR,PROGRAM_VERSION_MAINTENANCE
#pragma once // These numbers and strings need to be manually updated for a new version. // Do this version number update as the very last commit for the new release version. #define PROGRAM_VERSION_MAJOR 2 #define PROGRAM_VERSION_MINOR 0 #define PROGRAM_VERSION_MAINTENANCE 1 #define PROGRAM_VERSION_STRING "2.0.1b SDL mod by Krejza9" #define PROGRAM_BUILT_STRING __DATE__ " - " __TIME__ #define RESOURCE_VERSION_STRING "2,0,1\0" #define RESOURCE_VERSION PROGRAM_VERSION_MAJOR,PROGRAM_VERSION_MINOR,PROGRAM_VERSION_MAINTENANCE
Update version to 2.0.1b SDL mod by Krejza9.
Update version to 2.0.1b SDL mod by Krejza9.
C
mit
Krejza9/EmulationStation-sdlmixer,Krejza9/EmulationStation-sdlmixer,Krejza9/EmulationStation-sdlmixer
4e24df1ba483b3028017176b08bc336b8ca79274
AFToolkit/AFToolkit.h
AFToolkit/AFToolkit.h
// // Toolkit header to include the main headers of the 'AFToolkit' library. // #pragma mark - Common Import #import "AFLogHelper.h" #import "AFFileHelper.h" #import "AFPlatformHelper.h" #import "AFKVO.h" #import "AFArray.h" #import "AFMutableArray.h" #import "UITableViewCell+Universal.h" #import "AFDBClient.h" #import "AFView.h" #import "AFViewController.h"
// // Toolkit header to include the main headers of the 'AFToolkit' library. // #import "AFDefines.h" #import "AFLogHelper.h" #import "AFFileHelper.h" #import "AFPlatformHelper.h" #import "AFKVO.h" #import "AFArray.h" #import "AFMutableArray.h" #import "UITableViewCell+Universal.h" #import "AFDBClient.h" #import "AFView.h" #import "AFViewController.h"
Add defines header to toolkit header
Add defines header to toolkit header
C
mit
mlatham/AFToolkit
83cf9c9d6a93e0a651547662d556da840bf66b98
testmud/mud/home/Game/sys/testd.c
testmud/mud/home/Game/sys/testd.c
#include <kotaka/paths.h> #include <kotaka/log.h> #include "~/test.h" #include <status.h> static void create() { } void ignite(int count) { call_out("bomb", 0, count); } static void bomb(int quota) { int max; max = (int)sqrt((float)quota); if (quota % max != 0) { max = quota % max; } if (max > quota) { max = quota; } for (; quota > 0 && max > 0; quota--, max--) { clone_object("~/obj/bomb"); } LOGD->post_message("test", LOG_INFO, quota + " bombs left to clone."); if (quota > 0) { call_out("bomb", 0, quota); } }
#include <kotaka/paths.h> #include <kotaka/log.h> #include "~/test.h" #include <status.h> static void create() { } void ignite(int count) { call_out("bomb", 0, count); } void touchall() { int i; LOGD->post_message("test", LOG_INFO, "Beginning touch"); call_out("do_touch", 0, status(ST_OTABSIZE) - 1); } static void do_touch(int quota) { int limit; limit = 1024; if (quota % limit != 0) { limit = quota % limit; } for (; quota >= 0 && limit > 0; quota--, limit--) { object bomb; if (bomb = find_object("~/obj/bomb" + quota)) { call_touch(bomb); } } LOGD->post_message("test", LOG_INFO, quota + " objects left to check for touches."); if (quota > 0) { call_out("do_touch", 0, quota); } } static void bomb(int quota) { int limit; limit = 200; for (; quota > 0 && limit > 0; quota--, limit--) { clone_object("~/obj/bomb"); } LOGD->post_message("test", LOG_INFO, quota + " bombs left to clone."); if (quota > 0) { call_out("bomb", 0, quota); } }
Add call_touch to game test
Add call_touch to game test
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
ad7f53cdb35644304350b077a9ac11e5ec588036
tests/include/alt-dummy/ecp_alt.h
tests/include/alt-dummy/ecp_alt.h
/* ecp_alt.h with dummy types for MBEDTLS_ECP_ALT */ /* * Copyright The Mbed TLS Contributors * 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 ECP_ALT_H #define ECP_ALT_H typedef struct mbedtls_ecp_group { int dummy; } mbedtls_ecp_group; #if !defined(MBEDTLS_ECP_WINDOW_SIZE) #define MBEDTLS_ECP_WINDOW_SIZE 6 #endif #if !defined(MBEDTLS_ECP_FIXED_POINT_OPTIM) #define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 #endif #endif /* ecp_alt.h */
/* ecp_alt.h with dummy types for MBEDTLS_ECP_ALT */ /* * Copyright The Mbed TLS Contributors * 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 ECP_ALT_H #define ECP_ALT_H typedef struct mbedtls_ecp_group { const mbedtls_ecp_group_id id; const mbedtls_mpi P; const mbedtls_mpi A; const mbedtls_mpi B; const mbedtls_ecp_point G; const mbedtls_mpi N; const size_t pbits; const size_t nbits; } mbedtls_ecp_group; #endif /* ecp_alt.h */
Define public fields of mbedtls_ecp_group in alt test header
Define public fields of mbedtls_ecp_group in alt test header And don't define configuration macros that only apply to the built-in implementation. Signed-off-by: Gilles Peskine <f805f64266d288fc5467baa7be6cd0ff366f477b@arm.com>
C
apache-2.0
Mbed-TLS/mbedtls,ARMmbed/mbedtls,NXPmicro/mbedtls,ARMmbed/mbedtls,ARMmbed/mbedtls,NXPmicro/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls,NXPmicro/mbedtls,Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,NXPmicro/mbedtls
192b4b9f4ff72f49c2b04255be5bf9f83c036b99
SSPSolution/AIDLL/AIComponent.h
SSPSolution/AIDLL/AIComponent.h
#ifndef AIDLL_AI_AICOMPONENT_H #define AIDLL_AI_AICOMPONENT_H #include <DirectXMath.h> struct AIComponent { int active = 0; int entityID = -1; int direction; int currentPos; int nextPos; DirectX::XMVECTOR waypoints[8]; }; #endif
#ifndef AIDLL_AI_AICOMPONENT_H #define AIDLL_AI_AICOMPONENT_H #include <DirectXMath.h> struct AIComponent { int active = 0; int entityID = -1; int direction; int currentWaypoint; int nextWaypoint; DirectX::XMVECTOR waypoints[8]; }; #endif
UPDATE changes made to names of variables in the AIComopnent
UPDATE changes made to names of variables in the AIComopnent
C
apache-2.0
Chringo/SSP,Chringo/SSP
45169603e17e944b18aa19f66602c32c54fbf90e
sploits/sploit1.c
sploits/sploit1.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "shellcode.h" #define TARGET "/tmp/target2" int main(void) { char *args[3]; char *env[1]; char buf[248]; memset(buf, 0x90, 248); strncpy(buf+195, shellcode, 45); strncpy(buf+244, "\x08\xfd\xff\xbf", 4); //strncpy(buf+244, "\x12\x34\x56\x78", 4); args[0] = TARGET; args[1] = buf; args[2] = NULL; env[0] = NULL; if (0 > execve(TARGET, args, env)) fprintf(stderr, "execve failed.\n"); return 0; }
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "shellcode.h" #define TARGET "/tmp/target1" int main(void) { char *args[3]; char *env[1]; char buf[248]; memset(buf, 0x90, 248); strncpy(buf+195, shellcode, 45); strncpy(buf+244, "\x08\xfd\xff\xbf", 4); //strncpy(buf+244, "\x12\x34\x56\x78", 4); args[0] = TARGET; args[1] = buf; args[2] = NULL; env[0] = NULL; if (0 > execve(TARGET, args, env)) fprintf(stderr, "execve failed.\n"); return 0; }
Make sure the sploit points to the correct target
Make sure the sploit points to the correct target
C
mit
somethingnew2-0/CS642-HW1
a4e756b0fb114822a5c2cc0c3a1ecd68308093a4
KPNavViewController.h
KPNavViewController.h
#import <KPToolbox/KPViewController.h> @class KPNavigationController; @interface KPNavViewController : KPViewController @property(readwrite, weak) KPNavigationController* navigationController; @property(readwrite, strong) NSString* navigationTitle; @property(readwrite, strong) NSButton* backButton; @property(readwrite, strong) IBOutlet NSView* leftNavigationBarView; @property(readwrite, strong) IBOutlet NSView* centerNavigationBarView; @property(readwrite, strong) IBOutlet NSView* rightNavigationBarView; @property(readwrite, strong) IBOutlet NSView* navigationToolbar; - (void) viewWillAppear: (BOOL) animated; - (void) viewDidAppear: (BOOL) animated; - (void) viewWillDisappear: (BOOL) animated; - (void) viewDidDisappear: (BOOL) animated; @end
#import <KPToolbox/KPViewController.h> @class KPNavigationController; @interface KPNavViewController : KPViewController @property(readwrite, weak) KPNavigationController* navigationController; @property(readwrite, copy) NSString* navigationTitle; @property(readwrite, strong) NSButton* backButton; @property(readwrite, strong) IBOutlet NSView* leftNavigationBarView; @property(readwrite, strong) IBOutlet NSView* centerNavigationBarView; @property(readwrite, strong) IBOutlet NSView* rightNavigationBarView; @property(readwrite, strong) IBOutlet NSView* navigationToolbar; - (void) viewWillAppear: (BOOL) animated; - (void) viewDidAppear: (BOOL) animated; - (void) viewWillDisappear: (BOOL) animated; - (void) viewDidDisappear: (BOOL) animated; @end
Use a copy property semantics instead of strong.
Use a copy property semantics instead of strong.
C
mit
konstantinpavlikhin/KSPNavigationController
223c87c1570327fc88dd8e98534aef9e1ac8c534
AdjacentDifferenceStreamProvider.h
AdjacentDifferenceStreamProvider.h
#ifndef ADJACENT_DIFFERENCE_STREAM_PROVIDER_H #define ADJACENT_DIFFERENCE_STREAM_PROVIDER_H #include "StreamProvider.h" #include "Utility.h" template<typename T, typename Subtractor> class AdjacentDifferenceStreamProvider : public StreamProvider<ReturnType<Subtractor, T&, T&>> { public: using DiffType = ReturnType<Subtractor, T&, T&>; AdjacentDifferenceStreamProvider(StreamProviderPtr<T> source, Subtractor&& subtract) : source_(std::move(source)), subtract_(subtract) {} std::shared_ptr<DiffType> get() override { return std::make_shared<DiffType>(subtract_(*second_, *first_)); } bool advance() override { if(first_advance_) { first_advance_ = false; if(source_->advance()) { first_ = source_->get(); } else { return false; } if(source_->advance()) { second_ = source_->get(); } else { first_.reset(); return false; } return true; } first_ = std::move(second_); if(source_->advance()) { second_ = source_->get(); return true; } first_.reset(); return false; } private: StreamProviderPtr<T> source_; Subtractor subtract_; std::shared_ptr<T> first_; std::shared_ptr<T> second_; bool first_advance_ = true; }; #endif
#ifndef ADJACENT_DIFFERENCE_STREAM_PROVIDER_H #define ADJACENT_DIFFERENCE_STREAM_PROVIDER_H #include "StreamProvider.h" #include "Utility.h" template<typename T, typename Subtractor> class AdjacentDifferenceStreamProvider : public StreamProvider<ReturnType<Subtractor, T&, T&>> { public: using DiffType = ReturnType<Subtractor, T&, T&>; AdjacentDifferenceStreamProvider(StreamProviderPtr<T> source, Subtractor&& subtract) : source_(std::move(source)), subtract_(subtract) {} std::shared_ptr<DiffType> get() override { return result_; } bool advance() override { if(first_advance_) { first_advance_ = false; if(source_->advance()) { first_ = source_->get(); } else { return false; } if(source_->advance()) { second_ = source_->get(); } else { first_.reset(); return false; } result_ = std::make_shared<DiffType>(subtract_(*second_, *first_)); return true; } first_ = std::move(second_); if(source_->advance()) { second_ = source_->get(); result_ = std::make_shared<DiffType>(subtract_(*second_, *first_)); return true; } first_.reset(); result_.reset(); return false; } private: StreamProviderPtr<T> source_; Subtractor subtract_; std::shared_ptr<T> first_; std::shared_ptr<T> second_; std::shared_ptr<DiffType> result_; bool first_advance_ = true; }; #endif
Make adjacent difference getter consistent with other providers
Make adjacent difference getter consistent with other providers
C
mit
jscheiny/Streams,respu/Streams,bowlofstew/Streams,bowlofstew/Streams,respu/Streams,jscheiny/Streams
9496821bdda5defa93aa3ae2ea476b662fb729b5
src/commands.h
src/commands.h
#ifndef LACO_COMMANDS_H #define LACO_COMMANDS_H struct LacoState; typedef void (*LacoHandler)(struct LacoState* laco, const char** arguments); struct LacoCommand { const char** matches; LacoHandler handler; }; void laco_dispatch(const struct LacoCommand* commands, struct LacoState* laco, const char* command_keyword, const char** arguments); /** * Gets passed ever line to see if it matches one of the REPL command. If it * does, that command will be executed. */ void laco_handle_command(struct LacoState* laco, char* line); #endif /* LACO_COMMANDS_H */
#ifndef LACO_COMMANDS_H #define LACO_COMMANDS_H struct LacoState; typedef void (*LacoHandler)(struct LacoState* laco, const char** arguments); struct LacoCommand { const char** matches; LacoHandler handler; }; /** * Goes through each instance from the list of commands and see if there is * a match with for command_keyword. When there is a match, the defined * handler inside the LacoCommand gets called -- passing in LacoState and * the arguments. The list of commands expects the last entry of the array * to be `{ NULL, NULL }` for ease of iteration. */ void laco_dispatch(const struct LacoCommand* commands, struct LacoState* laco, const char* command_keyword, const char** arguments); /** * Gets passed ever line to see if it matches one of the REPL command. If it * does, that command will be executed. */ void laco_handle_command(struct LacoState* laco, char* line); #endif /* LACO_COMMANDS_H */
Add documentation for the laco_dispatch function
Add documentation for the laco_dispatch function
C
bsd-2-clause
sourrust/laco
6420adb9d93a17d3d16ae17bb67b012273fa0e8d
sbr/context_del.c
sbr/context_del.c
/* * context_del.c -- delete an entry from the context/profile list * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ #include <h/mh.h> /* * Delete a key/value pair from the context/profile list. * Return 0 if key is found, else return 1. */ int context_del (char *key) { struct node *np, *pp; for (np = m_defs, pp = NULL; np; pp = np, np = np->n_next) { if (!strcasecmp (np->n_name ? np->n_name : "", key ? key : "")) { if (!np->n_context) admonish (NULL, "bug: context_del(key=\"%s\")", np->n_name); if (pp) pp->n_next = np->n_next; else m_defs = np->n_next; free (np->n_name); if (np->n_field) free (np->n_field); free ((char *) np); ctxflags |= CTXMOD; return 0; } } return 1; }
/* * context_del.c -- delete an entry from the context/profile list * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ #include <h/mh.h> #include <h/utils.h> /* * Delete a key/value pair from the context/profile list. * Return 0 if key is found, else return 1. */ int context_del (char *key) { struct node *np, *pp; for (np = m_defs, pp = NULL; np; pp = np, np = np->n_next) { if (!strcasecmp (np->n_name ? np->n_name : "", key ? key : "")) { if (!np->n_context) admonish (NULL, "bug: context_del(key=\"%s\")", np->n_name); if (pp) pp->n_next = np->n_next; else m_defs = np->n_next; free (np->n_name); mh_xfree(np->n_field); free ((char *) np); ctxflags |= CTXMOD; return 0; } } return 1; }
Replace `if (p) free(p)' with `mh_xfree(p)'.
Replace `if (p) free(p)' with `mh_xfree(p)'.
C
bsd-3-clause
mcr/nmh,mcr/nmh
7b2d21e3710781fa223d8200b59c841771ff73d3
test/Analysis/array-struct.c
test/Analysis/array-struct.c
// RUN: clang -checker-simple -verify %s // RUN: clang -checker-simple -analyzer-store-region -verify %s struct s { int data; int data_array[10]; }; typedef struct { int data; } STYPE; void g1(struct s* p); void f(void) { int a[10]; int (*p)[10]; p = &a; (*p)[3] = 1; struct s d; struct s *q; q = &d; q->data = 3; d.data_array[9] = 17; } void f2() { char *p = "/usr/local"; char (*q)[4]; q = &"abc"; } void f3() { STYPE s; } void f4() { int a[] = { 1, 2, 3}; int b[3] = { 1, 2 }; } void f5() { struct s data; g1(&data); }
// RUN: clang -checker-simple -verify %s && // RUN: clang -checker-simple -analyzer-store-region -verify %s struct s { int data; int data_array[10]; }; typedef struct { int data; } STYPE; void g1(struct s* p); void f(void) { int a[10]; int (*p)[10]; p = &a; (*p)[3] = 1; struct s d; struct s *q; q = &d; q->data = 3; d.data_array[9] = 17; } void f2() { char *p = "/usr/local"; char (*q)[4]; q = &"abc"; } void f3() { STYPE s; } void f4() { int a[] = { 1, 2, 3}; int b[3] = { 1, 2 }; } void f5() { struct s data; g1(&data); }
Append the test runs with '&&'.
Append the test runs with '&&'. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58851 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
f35eea985e4b20020c8a91533fcd769c5745662b
stm8/src/main.c
stm8/src/main.c
#include <stdint.h> #include "stm8s208s.h" void main(void) { MEMLOC(CLK_CKDIVR) = 0x00; // Set the frequency to 16 MHz BITSET(CLK_PCKENR1, 7); // Configure timer // 1000 ticks per second MEMLOC(TIM1_PSCRH) = (16000>>8); MEMLOC(TIM1_PSCRL) = (uint8_t)(16000 & 0xff); // Enable timer MEMLOC(TIM1_CR1) = 0x01; /* Set PB0 as output */ BITSET(PB_DDR, 0); /* Set low speed mode */ BITRST(PB_CR2, 0); /* Set Push/Pull mode */ BITSET(PB_CR1, 0); for(;;) { if ((MEMLOC(TIM1_CNTRL)) % 1000 <= 500) { BITTOG(PB_ODR, 0); } } }
#include <stdint.h> #include "stm8s208s.h" void main(void) { MEMLOC(CLK_CKDIVR) = 0x00; /* Set the frequency to 16 MHz */ BITSET(CLK_PCKENR1, 7); /* Enable clk to TIM1 */ // Configure timer // 250 ticks per second MEMLOC(TIM1_PSCRH) = (64000>>8); MEMLOC(TIM1_PSCRL) = (uint8_t)(64000 & 0xff); MEMLOC(TIM1_CR1) = 0x01; /* Enable timer */ BITSET(PB_DDR, 0); /* Set PB0 as output */ BITRST(PB_CR2, 0); /* Set low speed mode */ BITSET(PB_CR1, 0); /* Set Push/Pull mode */ for(;;) { if ((MEMLOC(TIM1_CNTRL)) % 250 <= 125) { BITTOG(PB_ODR, 0); } } }
Reduce ticks to 250 to use 8bit diff
Reduce ticks to 250 to use 8bit diff
C
bsd-3-clause
spoorcc/docker_embedded,spoorcc/docker_embedded
b675c4d898d18514312a867ffca73d09e438f7c0
t/aget_value_t.c
t/aget_value_t.c
#include "maxminddb_test_helper.h" void run_tests(int mode, const char *mode_desc) { const char *filename = "MaxMind-DB-test-decoder.mmdb"; const char *path = test_database_path(filename); MMDB_s *mmdb = open_ok(path, mode, mode_desc); free((void *)path); const char *ip = "1.1.1.1"; MMDB_lookup_result_s result = lookup_string_ok(mmdb, ip, filename, mode_desc); MMDB_entry_data_s entry_data; char *lookup_path[] = { "array", "0", NULL }; int status = MMDB_aget_value(&result.entry, &entry_data, lookup_path); cmp_ok(status, "==", MMDB_SUCCESS, "status for MMDB_get_value() is MMDB_SUCCESS"); ok(entry_data.has_data, "found a value with MMDB_aget_value"); cmp_ok(entry_data.type, "==", MMDB_DATA_TYPE_UINT32, "returned entry type is uint32"); cmp_ok(entry_data.uint32, "==", 1, "entry value is 1"); MMDB_close(mmdb); free(mmdb); } int main(void) { plan(NO_PLAN); for_all_modes(&run_tests); done_testing(); }
#include "maxminddb_test_helper.h" void run_tests(int mode, const char *mode_desc) { const char *filename = "MaxMind-DB-test-decoder.mmdb"; const char *path = test_database_path(filename); MMDB_s *mmdb = open_ok(path, mode, mode_desc); free((void *)path); const char *ip = "1.1.1.1"; MMDB_lookup_result_s result = lookup_string_ok(mmdb, ip, filename, mode_desc); MMDB_entry_data_s entry_data; char *lookup_path[] = { "array", "0", NULL }; int status = MMDB_aget_value(&result.entry, &entry_data, lookup_path); cmp_ok(status, "==", MMDB_SUCCESS, "status for MMDB_aget_value() is MMDB_SUCCESS"); ok(entry_data.has_data, "found a value with MMDB_aget_value"); cmp_ok(entry_data.type, "==", MMDB_DATA_TYPE_UINT32, "returned entry type is uint32"); cmp_ok(entry_data.uint32, "==", 1, "entry value is 1"); MMDB_close(mmdb); free(mmdb); } int main(void) { plan(NO_PLAN); for_all_modes(&run_tests); done_testing(); }
Fix typo in test description
Fix typo in test description
C
apache-2.0
maxmind/libmaxminddb,maxmind/libmaxminddb,maxmind/libmaxminddb
8afc766b82b045474873b2c6365bd31b449749ef
src/os.h
src/os.h
// // Created by dar on 1/29/16. // #ifndef C003_OS_H #define C003_OS_H enum class OS { WIN32 = 0, UNIX, ANDROID, APPLE }; constexpr const OS OPERATING_SYTEM = #ifdef _WIN32 OS::WIN32 #elif __APPLE__ OS::APPLE #elif __ANDROID__ OS::ANDROID #elif __unix__ OS::UNIX #endif ; constexpr const bool IS_MOBILE = OPERATING_SYTEM == OS::ANDROID || OPERATING_SYTEM == OS::APPLE; #endif //C003_OS_H
// // Created by dar on 1/29/16. // #ifndef C003_OS_H #define C003_OS_H enum class OS { WIN32 = 0, UNIX, ANDROID, IOS, MAC }; #ifdef __APPLE__ #include "TargetConditionals.h" #endif constexpr const OS OPERATING_SYTEM = #ifdef _WIN32 OS::WIN32 #elif __APPLE__ #if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE OS::IOS #elif TARGET_OS_MAC OS::MAC #else #error "Unknown Apple platform" #endif #elif __ANDROID__ OS::ANDROID #elif __unix__ OS::UNIX #else #error "Unknown platform" #endif ; constexpr const bool IS_MOBILE = OPERATING_SYTEM == OS::ANDROID || OPERATING_SYTEM == OS::IOS; #endif //C003_OS_H
Split APPLE operating system to IOS and MAC
Split APPLE operating system to IOS and MAC
C
mit
darsto/spooky,darsto/spooky
cd8b79f334adff93acea8dfe586d61bb7eaec3e4
src/phys_const.h
src/phys_const.h
#ifndef LIBEFP_PHYS_CONST_H #define LIBEFP_PHYS_CONST_H /* Bohr radius in angstroms */ #define BOHR_RADIUS 0.52917724924 #endif /* LIBEFP_PHYS_CONST_H */
#ifndef LIBEFP_PHYS_CONST_H #define LIBEFP_PHYS_CONST_H /* Bohr radius in angstroms */ #define BOHR_RADIUS 0.52917721092 #endif /* LIBEFP_PHYS_CONST_H */
Use value from CODATA 2010.
Use value from CODATA 2010.
C
bsd-2-clause
libefp/libefp,libefp/libefp,libefp/libefp
fea93e818380d4d9b3b68bc47509058f60b8cdb7
src/arch/sparc/kernel/arch.c
src/arch/sparc/kernel/arch.c
/** * @file * @brief Implements ARCH interface for sparc processors * * @date 14.02.10 * @author Eldar Abusalimov */ #include <hal/arch.h> #include <asm/cache.h> #include <hal/ipl.h> void arch_init(void) { cache_enable(); } void arch_idle(void) { } unsigned int arch_excep_disable(void) { unsigned int ret; unsigned int tmp; __asm__ __volatile__ ( "rd %%psr, %0\n\t" "andn %0, %2, %1\n\t" "wr %1, 0, %%psr\n\t" " nop; nop; nop\n" : "=&r" (ret), "=r" (tmp) : "i" (PSR_ET) : "memory" ); return ret; } void __attribute__ ((noreturn)) arch_shutdown(arch_shutdown_mode_t mode) { ipl_disable(); arch_excep_disable(); asm ("ta 0"); while (1) {} }
/** * @file * @brief Implements ARCH interface for sparc processors * * @date 14.02.10 * @author Eldar Abusalimov */ #include <hal/arch.h> #include <asm/cache.h> #include <hal/ipl.h> void arch_init(void) { cache_enable(); } void arch_idle(void) { __asm__ __volatile__ ("wr %g0, %asr19"); } unsigned int arch_excep_disable(void) { unsigned int ret; unsigned int tmp; __asm__ __volatile__ ( "rd %%psr, %0\n\t" "andn %0, %2, %1\n\t" "wr %1, 0, %%psr\n\t" " nop; nop; nop\n" : "=&r" (ret), "=r" (tmp) : "i" (PSR_ET) : "memory" ); return ret; } void __attribute__ ((noreturn)) arch_shutdown(arch_shutdown_mode_t mode) { ipl_disable(); arch_excep_disable(); asm ("ta 0"); while (1) {} }
Add power down mode for idle circle
sparc: Add power down mode for idle circle
C
bsd-2-clause
abusalimov/embox,mike2390/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,embox/embox,embox/embox,abusalimov/embox,gzoom13/embox,gzoom13/embox,Kakadu/embox,mike2390/embox,mike2390/embox,embox/embox,gzoom13/embox,Kefir0192/embox,Kakadu/embox,Kakadu/embox,Kefir0192/embox,gzoom13/embox,mike2390/embox,Kakadu/embox,Kefir0192/embox,abusalimov/embox,abusalimov/embox,Kakadu/embox,vrxfile/embox-trik,embox/embox,gzoom13/embox,Kefir0192/embox,Kefir0192/embox,mike2390/embox,abusalimov/embox,vrxfile/embox-trik,mike2390/embox,vrxfile/embox-trik,gzoom13/embox,vrxfile/embox-trik,Kakadu/embox,vrxfile/embox-trik,Kefir0192/embox,vrxfile/embox-trik,embox/embox,mike2390/embox,embox/embox,Kakadu/embox,gzoom13/embox
5527ee34788794f84b8730d01eb8383aa898fd59
include/mintpack/random.h
include/mintpack/random.h
#ifndef __MINTPACK_RANDOM_H__ #define __MINTPACK_RANDOM_H__ #include <mintomic/mintomic.h> //------------------------------------- // PRNG that seeds itself using various information from the environment. // generate() is uniformly distributed across all 32-bit integer values. // generateUnique() returns unique integers 2^32 times in a row, then repeats the sequence. //------------------------------------- class Random { private: static const int kNumOffsets = 8; static mint_atomic32_t m_sharedCounter; uint32_t m_value; uint32_t m_offsets[kNumOffsets]; public: Random(); uint32_t generate32(); uint32_t generateUnique32(); uint64_t generate64() { return (((uint64_t) generate32()) << 32) | generate32(); } }; #endif // __MINTPACK_RANDOM_H__
#ifndef __MINTPACK_RANDOM_H__ #define __MINTPACK_RANDOM_H__ #include <mintomic/mintomic.h> //------------------------------------- // PRNG that seeds itself using various information from the environment. // generate32() is uniformly distributed across all 32-bit integer values. // generateUnique32() returns unique integers 2^32 times in a row, then repeats the sequence. //------------------------------------- class Random { private: static const int kNumOffsets = 8; static mint_atomic32_t m_sharedCounter; uint32_t m_value; uint32_t m_offsets[kNumOffsets]; public: Random(); uint32_t generate32(); uint32_t generateUnique32(); uint64_t generate64() { return (((uint64_t) generate32()) << 32) | generate32(); } }; #endif // __MINTPACK_RANDOM_H__
Fix function names in Random comment
Fix function names in Random comment
C
bsd-3-clause
adream307/mintomic,UIKit0/mintomic,adream307/mintomic,mulle-nat/mintomic,mintomic/mintomic,mintomic/mintomic,mulle-nat/mintomic,UIKit0/mintomic
a9623da05f8a2930fadafd27fe621b16886b259d
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k11"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.04.00-k0"
Update driver version to 5.04.00-k0
[SCSI] qla4xxx: Update driver version to 5.04.00-k0 Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com> Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
0cd78c0a12ebc84b56a58016fbcc83aefba64e1a
fitz/base_time.c
fitz/base_time.c
#ifdef _WIN32 #include <time.h> #include <winsock2.h> #include <windows.h> #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 #else #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL #endif struct timeval; int gettimeofday(struct timeval *tv, struct timezone *tz) { FILETIME ft; unsigned __int64 tmpres = 0; if (tv) { GetSystemTimeAsFileTime(&ft); tmpres |= ft.dwHighDateTime; tmpres <<= 32; tmpres |= ft.dwLowDateTime; tmpres /= 10; /*convert into microseconds*/ /*converting file time to unix epoch*/ tmpres -= DELTA_EPOCH_IN_MICROSECS; tv->tv_sec = (long)(tmpres / 1000000UL); tv->tv_usec = (long)(tmpres % 1000000UL); } return 0; } #else void fz_gettimeofday_dummy() { } #endif
#ifdef _WIN32 #include <time.h> #ifndef METRO #include <winsock2.h> #endif #include <windows.h> #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 #else #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL #endif struct timeval; int gettimeofday(struct timeval *tv, struct timezone *tz) { FILETIME ft; unsigned __int64 tmpres = 0; if (tv) { GetSystemTimeAsFileTime(&ft); tmpres |= ft.dwHighDateTime; tmpres <<= 32; tmpres |= ft.dwLowDateTime; tmpres /= 10; /*convert into microseconds*/ /*converting file time to unix epoch*/ tmpres -= DELTA_EPOCH_IN_MICROSECS; tv->tv_sec = (long)(tmpres / 1000000UL); tv->tv_usec = (long)(tmpres % 1000000UL); } return 0; } #else void fz_gettimeofday_dummy() { } #endif
Tweak to allow building on metro.
Tweak to allow building on metro. Limited testing seems to suggest that the only thing stopping the MuPDF library building on metro seems to be the use of winsock.h.
C
agpl-3.0
hackqiang/mupdf,crow-misia/mupdf,knielsen/mupdf,lustersir/MuPDF,ArtifexSoftware/mupdf,lamemate/mupdf,flipstudio/MuPDF,FabriceSalvaire/mupdf-cmake,lolo32/mupdf-mirror,MokiMobility/muPDF,geetakaur/NewApps,sebras/mupdf,Kalp695/mupdf,kobolabs/mupdf,asbloomf/mupdf,hxx0215/MuPDFMirror,michaelcadilhac/pdfannot,tophyr/mupdf,hjiayz/forkmupdf,muennich/mupdf,benoit-pierre/mupdf,muennich/mupdf,xiangxw/mupdf,FabriceSalvaire/mupdf-v1.3,github201407/MuPDF,zeniko/mupdf,poor-grad-student/mupdf,flipstudio/MuPDF,ArtifexSoftware/mupdf,seagullua/MuPDF,MokiMobility/muPDF,knielsen/mupdf,ylixir/mupdf,github201407/MuPDF,PuzzleFlow/mupdf,derek-watson/mupdf,crow-misia/mupdf,wzhsunn/mupdf,kobolabs/mupdf,cgogolin/penandpdf,wzhsunn/mupdf,lustersir/MuPDF,Kalp695/mupdf,lamemate/mupdf,fluks/mupdf-x11-bookmarks,nqv/mupdf,hackqiang/mupdf,github201407/MuPDF,fluks/mupdf-x11-bookmarks,ccxvii/mupdf,sebras/mupdf,clchiou/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,andyhan/mupdf,michaelcadilhac/pdfannot,derek-watson/mupdf,samturneruk/mupdf_secure_android,tribals/mupdf,wzhsunn/mupdf,Kalp695/mupdf,wild0/opened_mupdf,FabriceSalvaire/mupdf-v1.3,wild0/opened_mupdf,ArtifexSoftware/mupdf,issuestand/mupdf,TamirEvan/mupdf,muennich/mupdf,andyhan/mupdf,kobolabs/mupdf,poor-grad-student/mupdf,hxx0215/MuPDFMirror,robamler/mupdf-nacl,sebras/mupdf,muennich/mupdf,tribals/mupdf,issuestand/mupdf,hackqiang/mupdf,ccxvii/mupdf,ArtifexSoftware/mupdf,cgogolin/penandpdf,geetakaur/NewApps,asbloomf/mupdf,andyhan/mupdf,nqv/mupdf,loungeup/mupdf,hxx0215/MuPDFMirror,lustersir/MuPDF,wild0/opened_mupdf,fluks/mupdf-x11-bookmarks,seagullua/MuPDF,lamemate/mupdf,knielsen/mupdf,wzhsunn/mupdf,MokiMobility/muPDF,TamirEvan/mupdf,hjiayz/forkmupdf,github201407/MuPDF,nqv/mupdf,lolo32/mupdf-mirror,nqv/mupdf,samturneruk/mupdf_secure_android,PuzzleFlow/mupdf,loungeup/mupdf,Kalp695/mupdf,andyhan/mupdf,hjiayz/forkmupdf,hjiayz/forkmupdf,derek-watson/mupdf,hxx0215/MuPDFMirror,robamler/mupdf-nacl,sebras/mupdf,tribals/mupdf,seagullua/MuPDF,issuestand/mupdf,lustersir/MuPDF,Kalp695/mupdf,issuestand/mupdf,MokiMobility/muPDF,isavin/humblepdf,FabriceSalvaire/mupdf-cmake,samturneruk/mupdf_secure_android,clchiou/mupdf,hackqiang/mupdf,lolo32/mupdf-mirror,robamler/mupdf-nacl,FabriceSalvaire/mupdf-v1.3,wild0/opened_mupdf,github201407/MuPDF,isavin/humblepdf,zeniko/mupdf,tribals/mupdf,loungeup/mupdf,Kalp695/mupdf,hxx0215/MuPDFMirror,FabriceSalvaire/mupdf-v1.3,ziel/mupdf,zeniko/mupdf,cgogolin/penandpdf,zeniko/mupdf,tophyr/mupdf,lolo32/mupdf-mirror,TamirEvan/mupdf,hackqiang/mupdf,TamirEvan/mupdf,lamemate/mupdf,lolo32/mupdf-mirror,ziel/mupdf,muennich/mupdf,FabriceSalvaire/mupdf-cmake,geetakaur/NewApps,hjiayz/forkmupdf,robamler/mupdf-nacl,TamirEvan/mupdf,lolo32/mupdf-mirror,isavin/humblepdf,ccxvii/mupdf,lolo32/mupdf-mirror,flipstudio/MuPDF,knielsen/mupdf,ArtifexSoftware/mupdf,clchiou/mupdf,derek-watson/mupdf,benoit-pierre/mupdf,PuzzleFlow/mupdf,ylixir/mupdf,lamemate/mupdf,crow-misia/mupdf,MokiMobility/muPDF,samturneruk/mupdf_secure_android,poor-grad-student/mupdf,cgogolin/penandpdf,poor-grad-student/mupdf,hxx0215/MuPDFMirror,flipstudio/MuPDF,benoit-pierre/mupdf,MokiMobility/muPDF,andyhan/mupdf,flipstudio/MuPDF,isavin/humblepdf,geetakaur/NewApps,lustersir/MuPDF,FabriceSalvaire/mupdf-v1.3,isavin/humblepdf,FabriceSalvaire/mupdf-cmake,wzhsunn/mupdf,benoit-pierre/mupdf,xiangxw/mupdf,muennich/mupdf,clchiou/mupdf,ziel/mupdf,geetakaur/NewApps,michaelcadilhac/pdfannot,benoit-pierre/mupdf,derek-watson/mupdf,sebras/mupdf,asbloomf/mupdf,knielsen/mupdf,kobolabs/mupdf,benoit-pierre/mupdf,zeniko/mupdf,xiangxw/mupdf,isavin/humblepdf,PuzzleFlow/mupdf,PuzzleFlow/mupdf,tophyr/mupdf,michaelcadilhac/pdfannot,FabriceSalvaire/mupdf-v1.3,tophyr/mupdf,lustersir/MuPDF,wzhsunn/mupdf,ylixir/mupdf,samturneruk/mupdf_secure_android,TamirEvan/mupdf,michaelcadilhac/pdfannot,crow-misia/mupdf,tophyr/mupdf,geetakaur/NewApps,PuzzleFlow/mupdf,zeniko/mupdf,ylixir/mupdf,loungeup/mupdf,fluks/mupdf-x11-bookmarks,loungeup/mupdf,asbloomf/mupdf,ylixir/mupdf,github201407/MuPDF,tribals/mupdf,tophyr/mupdf,xiangxw/mupdf,poor-grad-student/mupdf,ziel/mupdf,fluks/mupdf-x11-bookmarks,xiangxw/mupdf,clchiou/mupdf,poor-grad-student/mupdf,crow-misia/mupdf,xiangxw/mupdf,loungeup/mupdf,isavin/humblepdf,ziel/mupdf,hjiayz/forkmupdf,andyhan/mupdf,kobolabs/mupdf,ArtifexSoftware/mupdf,issuestand/mupdf,knielsen/mupdf,seagullua/MuPDF,FabriceSalvaire/mupdf-cmake,seagullua/MuPDF,muennich/mupdf,Kalp695/mupdf,nqv/mupdf,cgogolin/penandpdf,crow-misia/mupdf,nqv/mupdf,hackqiang/mupdf,TamirEvan/mupdf,samturneruk/mupdf_secure_android,xiangxw/mupdf,kobolabs/mupdf,ziel/mupdf,ccxvii/mupdf,fluks/mupdf-x11-bookmarks,ylixir/mupdf,PuzzleFlow/mupdf,ccxvii/mupdf,tribals/mupdf,kobolabs/mupdf,robamler/mupdf-nacl,wild0/opened_mupdf,flipstudio/MuPDF,fluks/mupdf-x11-bookmarks,lamemate/mupdf,FabriceSalvaire/mupdf-cmake,clchiou/mupdf,ccxvii/mupdf,sebras/mupdf,derek-watson/mupdf,michaelcadilhac/pdfannot,wild0/opened_mupdf,cgogolin/penandpdf,wild0/opened_mupdf,TamirEvan/mupdf,asbloomf/mupdf,issuestand/mupdf,robamler/mupdf-nacl,asbloomf/mupdf,seagullua/MuPDF
65a65f46dc4b8d2cf1ee83f05a280fdacbfd2416
critmem.h
critmem.h
#ifndef CRITMEM_H #define CRITMEM_H #include <sys/types.h> /*@only@*//*@out@*//*@notnull@*/ void *mycritmalloc(const char *f, long, size_t size, const char *message); /*@only@*//*@notnull@*/ void *mycritcalloc(const char *f, long, size_t size, const char *message); /*@only@*//*@out@*//*@notnull@*/ void *mycritrealloc(const char *f, long, /*@null@*//*@only@*//*@out@*//*@returned@*/ void *a, size_t size, const char *message); /*@only@*/ char *mycritstrdup(const char *f, long, const char *, const char *message); #define critmalloc(a,b) mycritmalloc(__FILE__,(long)__LINE__,a,b) #define critcalloc(a,b) mycritcalloc(__FILE__,(long)__LINE__,a,b) #define critrealloc(a,b,c) mycritrealloc(__FILE__,(long)__LINE__,a,b,c) #define critstrdup(a,b) mycritstrdup(__FILE__,(long)__LINE__,a,b) #endif
#ifndef CRITMEM_H #define CRITMEM_H #include "config.h" #include <sys/types.h> /*@only@*//*@out@*//*@notnull@*/ void *mycritmalloc(const char *f, long, size_t size, const char *message); /*@only@*//*@notnull@*/ void *mycritcalloc(const char *f, long, size_t size, const char *message); /*@only@*//*@out@*//*@notnull@*/ void *mycritrealloc(const char *f, long, /*@null@*//*@only@*//*@out@*//*@returned@*/ void *a, size_t size, const char *message); /*@only@*/ char *mycritstrdup(const char *f, long, const char *, const char *message); #define critmalloc(a,b) mycritmalloc(__FILE__,(long)__LINE__,a,b) #define critcalloc(a,b) mycritcalloc(__FILE__,(long)__LINE__,a,b) #define critrealloc(a,b,c) mycritrealloc(__FILE__,(long)__LINE__,a,b,c) #define critstrdup(a,b) mycritstrdup(__FILE__,(long)__LINE__,a,b) #endif
Include config.h, patch by Ralf Wildenhues.
Include config.h, patch by Ralf Wildenhues.
C
lgpl-2.1
BackupTheBerlios/leafnode,BackupTheBerlios/leafnode,BackupTheBerlios/leafnode,BackupTheBerlios/leafnode
979b40c26118cfc50d27eed458d71020e87dc629
mcrouter/CyclesObserver.h
mcrouter/CyclesObserver.h
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <folly/experimental/fibers/ExecutionObserver.h> #include "mcrouter/lib/cycles/Cycles.h" namespace facebook { namespace memcache { namespace mcrouter { class CyclesObserver : public folly::fibers::ExecutionObserver { public: void starting() noexcept override { if (!cycles::start()) { // Should never happen DCHECK(false) << "There is already one cycles interval " "active in this thread"; } } void stopped() noexcept override { cycles::finish(); } }; }}} // facebook::memcache::mcrouter
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <folly/experimental/fibers/ExecutionObserver.h> #include "mcrouter/lib/cycles/Cycles.h" namespace facebook { namespace memcache { namespace mcrouter { class CyclesObserver : public folly::fibers::ExecutionObserver { public: void starting(uintptr_t id) noexcept override { if (!cycles::start()) { // Should never happen DCHECK(false) << "There is already one cycles interval " "active in this thread"; } } void runnable(uintptr_t id) noexcept override {} void stopped(uintptr_t id) noexcept override { cycles::finish(); } }; }}} // facebook::memcache::mcrouter
Add 'runnable' callback to ExecutionObserver
Add 'runnable' callback to ExecutionObserver Summary: Add a callback when a fiber becomes runnable Test Plan: unit tests Reviewed By: @andriigrynenko Differential Revision: D2081306
C
bsd-3-clause
synecdoche/mcrouter,yqzhang/mcrouter,tempbottle/mcrouter,easyfmxu/mcrouter,reddit/mcrouter,is00hcw/mcrouter,nvaller/mcrouter,is00hcw/mcrouter,easyfmxu/mcrouter,easyfmxu/mcrouter,tempbottle/mcrouter,leitao/mcrouter,leitao/mcrouter,facebook/mcrouter,facebook/mcrouter,nvaller/mcrouter,reddit/mcrouter,zhlong73/mcrouter,is00hcw/mcrouter,evertrue/mcrouter,zhlong73/mcrouter,evertrue/mcrouter,glensc/mcrouter,nvaller/mcrouter,easyfmxu/mcrouter,zhlong73/mcrouter,glensc/mcrouter,yqzhang/mcrouter,zhlong73/mcrouter,synecdoche/mcrouter,leitao/mcrouter,synecdoche/mcrouter,nvaller/mcrouter,reddit/mcrouter,yqzhang/mcrouter,facebook/mcrouter,reddit/mcrouter,evertrue/mcrouter,synecdoche/mcrouter,evertrue/mcrouter,is00hcw/mcrouter,yqzhang/mcrouter,tempbottle/mcrouter,glensc/mcrouter,tempbottle/mcrouter,leitao/mcrouter,facebook/mcrouter,glensc/mcrouter
e7e2501f33c89d23bd938fe9f57964cf3f2e276a
fw/libs/AdapterBoard/usb_commands.h
fw/libs/AdapterBoard/usb_commands.h
/* USB commands use the first byte as the 'type' variable. * Subsequent bytes are generally the 'arguments'. * So host->device usb packets usually look like: * [command, arg1, arg2, 0, 0, ... , 0, 0] * to which the device will respond with * [CMD_ACK, command, 0, 0, 0 ..., 0, 0] * * The exception to this, are the commands which 'GET' * For them host->device generally looks like: * [command, 0, ..., 0, 0] * to which the device responds * [CMD_RESP, command, arg1, arg2, 0, ..., 0, 0] * */ #ifndef USB_COMMANDS_H #define USB_COMMANDS_H #define CMD_ACK 0xAF #define CMD_RESP 0xBF #define CMD_BL_ON 0x10 #define CMD_BL_OFF 0x11 #define CMD_BL_LEVEL 0x12 #define CMD_BL_UP 0x13 #define CMD_BL_DOWN 0x14 #define CMD_BL_GET_STATE 0x1F #define CMD_RGB_SET 0x20 #define CMD_RGB_GET 0x2F #endif
/* USB commands use the first byte as the 'type' variable. * Subsequent bytes are generally the 'arguments'. * So host->device usb packets usually look like: * [command, arg1, arg2, 0, 0, ... , 0, 0] * to which the device will respond with * [CMD_ACK, command, 0, 0, 0 ..., 0, 0] * * The exception to this, are the commands which 'GET' * For them host->device generally looks like: * [command, 0, ..., 0, 0] * to which the device responds * [CMD_RESP, command, arg1, arg2, 0, ..., 0, 0] * */ #ifndef USB_COMMANDS_H #define USB_COMMANDS_H #define CMD_ACK 0xAF #define CMD_RESP 0xBF #define CMD_BL_ON 0x10 #define CMD_BL_OFF 0x11 #define CMD_BL_LEVEL 0x12 #define CMD_BL_UP 0x13 #define CMD_BL_DOWN 0x14 #define CMD_BL_GET_STATE 0x1F #define CMD_RGB_SET 0x20 #define CMD_RGB_GET 0x2F #define IS_GET(x) (x == CMD_RGB_GET || x == CMD_BL_GET_STATE) #endif
Add a macro to determine whether a GET command
Add a macro to determine whether a GET command
C
bsd-3-clause
OSCARAdapter/OSCAR,OSCARAdapter/OSCAR