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
00429da5931314964a3f9d91ed93e32a0a6ab7b2
PBWebViewController/PBWebViewController.h
PBWebViewController/PBWebViewController.h
// // PBWebViewController.h // Pinbrowser // // Created by Mikael Konutgan on 11/02/2013. // Copyright (c) 2013 Mikael Konutgan. All rights reserved. // #import <UIKit/UIKit.h> @interface PBWebViewController : UIViewController <UIWebViewDelegate> @property (strong, nonatomic) NSURL *URL; @property (strong, nonatomic) NSArray *activityItems; @property (strong, nonatomic) NSArray *applicationActivities; @property (strong, nonatomic) NSArray *excludedActivityTypes; /** * A Boolean indicating whether the web view controller’s toolbar, * which displays a stop/refresh, back, forward and share button, is shown. * The default value of this property is `YES`. */ @property (assign, nonatomic) BOOL showsNavigationToolbar; - (void)load; - (void)clear; @end
// // PBWebViewController.h // Pinbrowser // // Created by Mikael Konutgan on 11/02/2013. // Copyright (c) 2013 Mikael Konutgan. All rights reserved. // #import <UIKit/UIKit.h> @interface PBWebViewController : UIViewController <UIWebViewDelegate> /** * The URL that will be loaded by the web view controller. * If there is one present when the web view appears, it will be automatically loaded, by calling `load`, * Otherwise, you can set a `URL` after the web view has already been loaded and then manually call `load`. */ @property (strong, nonatomic) NSURL *URL; /** The array of data objects on which to perform the activity. */ @property (strong, nonatomic) NSArray *activityItems; /** An array of UIActivity objects representing the custom services that your application supports. */ @property (strong, nonatomic) NSArray *applicationActivities; /** The list of services that should not be displayed. */ @property (strong, nonatomic) NSArray *excludedActivityTypes; /** * A Boolean indicating whether the web view controller’s toolbar, * which displays a stop/refresh, back, forward and share button, is shown. * The default value of this property is `YES`. */ @property (assign, nonatomic) BOOL showsNavigationToolbar; /** * Loads the given `URL`. This is called automatically when the when the web view appears if a `URL` exists, * otehrwise it can be called manually. */ - (void)load; /** * Clears the contents of the web view. */ - (void)clear; @end
Document all the public properties and methods
Document all the public properties and methods
C
mit
kmikael/PBWebViewController,jhmcclellandii/PBWebViewController,mobitar/MBXWebViewController,junjie/PBWebViewController
e143b52dbbee202551c0ccc7ce594cbe530a8391
ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapLocation/SetInitialMapLocation.h
ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapLocation/SetInitialMapLocation.h
// [WriteFile Name=SetInitialMapLocation, Category=Maps] // [Legal] // Copyright 2015 Esri. // 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. s// [Legal] #ifndef SET_INITIAL_MAP_LOCATION_H #define SET_INITIAL_MAP_LOCATION_H namespace Esri { namespace ArcGISRuntime { class Map; class MapQuickView; } } #include <QQuickItem> class SetInitialMapLocation : public QQuickItem { Q_OBJECT public: SetInitialMapLocation(QQuickItem* parent = 0); ~SetInitialMapLocation(); void componentComplete() Q_DECL_OVERRIDE; private: Esri::ArcGISRuntime::Map* m_map; Esri::ArcGISRuntime::MapQuickView* m_mapView; }; #endif // SET_INITIAL_MAP_LOCATION_H
// [WriteFile Name=SetInitialMapLocation, Category=Maps] // [Legal] // Copyright 2015 Esri. // 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. // [Legal] #ifndef SET_INITIAL_MAP_LOCATION_H #define SET_INITIAL_MAP_LOCATION_H namespace Esri { namespace ArcGISRuntime { class Map; class MapQuickView; } } #include <QQuickItem> class SetInitialMapLocation : public QQuickItem { Q_OBJECT public: SetInitialMapLocation(QQuickItem* parent = 0); ~SetInitialMapLocation(); void componentComplete() Q_DECL_OVERRIDE; private: Esri::ArcGISRuntime::Map* m_map; Esri::ArcGISRuntime::MapQuickView* m_mapView; }; #endif // SET_INITIAL_MAP_LOCATION_H
Fix legal comment build error
Fix legal comment build error
C
apache-2.0
Esri/arcgis-runtime-samples-qt,Esri/arcgis-runtime-samples-qt,Esri/arcgis-runtime-samples-qt,Esri/arcgis-runtime-samples-qt
2380cb3c0804df11297de421c4defec96de19f8b
src/2D_element_arithmetic.c
src/2D_element_arithmetic.c
#include<2D_element_arithmetic.h> matrix * elem_matrix_operation(elem (*fp)(elem, float), matrix * m, float param) { int i, j = 0; for(i = 0; i < m->rows; i++) { for(j =0; j < m->columns; j++) { set_matrix_member(m, i+1, j+1, (*fp)(m->arr[i*m->columns +j], param)); } } return m; } elem pow_elem(elem x, float p) { return (elem)pow(x, p); } elem sqroot_elem(elem x, float p) { float r = (float)1 / p; return pow_elem(x, r); }
#include<2D_element_arithmetic.h> matrix * elem_matrix_operation(elem (*fp)(elem, float), matrix * m, float param) { int i, j = 0; for(i = 0; i < m->rows; i++) { for(j =0; j < m->columns; j++) { set_matrix_member(m, i+1, j+1, (*fp)(m->arr[i*m->columns +j], param)); } } return m; } elem pow_elem(elem x, float p) { return (elem)floor(pow((float)x, p)); } elem sqroot_elem(elem x, float p) { float r = (float)1 / p; return pow_elem(x, r); }
Make explicit the casts and floor division in pow_elem function
Make explicit the casts and floor division in pow_elem function
C
mit
cphang99/matrix_playground,cphang99/matrix_playground,cphang99/matrix_playground
fab6f220cdbcd7269d8f6e19988774efe0a49983
test/Analysis/stack-addr-ps.c
test/Analysis/stack-addr-ps.c
// RUN: clang -checker-simple -verify %s int* f1() { int x = 0; return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}} } int* f2(int y) { return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}} } int* f3(int x, int *y) { int w = 0; if (x) y = &w; return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}} } void* compound_literal(int x) { if (x) return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}} int* array[] = {}; struct s { int z; double y; int w; }; return &((struct s){ 2, 0.4, 5 * 8 }); // expected-warning{{Address of stack memory}} }
// RUN: clang -checker-simple -verify %s int* f1() { int x = 0; return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}} } int* f2(int y) { return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}} } int* f3(int x, int *y) { int w = 0; if (x) y = &w; return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}} } void* compound_literal(int x, int y) { if (x) return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}} int* array[] = {}; struct s { int z; double y; int w; }; if (y) return &((struct s){ 2, 0.4, 5 * 8 }); // expected-warning{{Address of stack memory}} void* p = &((struct s){ 42, 0.4, x ? 42 : 0 }); return p; }
Enhance compound literal test case.
Enhance compound literal test case. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58480 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
ff4417bbf993d1695567ce8672a2c19f6f48f557
lib/Headers/varargs.h
lib/Headers/varargs.h
/*===---- varargs.h - Variable argument handling -------------------------------------=== * * 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 __VARARGS_H #define __VARARGS_H #error "Please use <stdarg.h> instead of <varargs.h>" #endif
/*===---- varargs.h - Variable argument handling -------------------------------------=== * * 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 __VARARGS_H #define __VARARGS_H #error "Please use <stdarg.h> instead of <varargs.h>" #endif
Add a newline at the end of the file.
Add a newline at the end of the file. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@99026 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
ce3668fd60044c328af41b358a66a0e6741db1fb
boot/espressif/hal/include/esp_log.h
boot/espressif/hal/include/esp_log.h
/* * Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd. * * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <mcuboot_config/mcuboot_logging.h> #define ESP_LOGE(tag, fmt, ...) MCUBOOT_LOG_ERR(fmt, ##__VA_ARGS__) #define ESP_LOGW(tag, fmt, ...) MCUBOOT_LOG_WRN(fmt, ##__VA_ARGS__) #define ESP_LOGI(tag, fmt, ...) MCUBOOT_LOG_INF(fmt, ##__VA_ARGS__) #define ESP_LOGD(tag, fmt, ...) MCUBOOT_LOG_DBG(fmt, ##__VA_ARGS__)
/* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <mcuboot_config/mcuboot_logging.h> #define ESP_LOGE(tag, fmt, ...) MCUBOOT_LOG_ERR("[%s] " fmt, tag, ##__VA_ARGS__) #define ESP_LOGW(tag, fmt, ...) MCUBOOT_LOG_WRN("[%s] " fmt, tag, ##__VA_ARGS__) #define ESP_LOGI(tag, fmt, ...) MCUBOOT_LOG_INF("[%s] " fmt, tag, ##__VA_ARGS__) #define ESP_LOGD(tag, fmt, ...) MCUBOOT_LOG_DBG("[%s] " fmt, tag, ##__VA_ARGS__) #define ESP_LOGV(tag, fmt, ...) MCUBOOT_LOG_DBG("[%s] " fmt, tag, ##__VA_ARGS__) #define ESP_EARLY_LOGE(tag, fmt, ...) MCUBOOT_LOG_ERR("[%s] " fmt, tag, ##__VA_ARGS__) #define ESP_EARLY_LOGW(tag, fmt, ...) MCUBOOT_LOG_WRN("[%s] " fmt, tag, ##__VA_ARGS__) #define ESP_EARLY_LOGI(tag, fmt, ...) MCUBOOT_LOG_INF("[%s] " fmt, tag, ##__VA_ARGS__) #define ESP_EARLY_LOGD(tag, fmt, ...) MCUBOOT_LOG_DBG("[%s] " fmt, tag, ##__VA_ARGS__) #define ESP_EARLY_LOGV(tag, fmt, ...) MCUBOOT_LOG_DBG("[%s] " fmt, tag, ##__VA_ARGS__)
Use "TAG" field from ESP_LOG* macros from IDF libraries
espressif: Use "TAG" field from ESP_LOG* macros from IDF libraries Signed-off-by: Gustavo Henrique Nihei <42b1270cfd1a4f11d4db08d9d441d5d8452cd3b6@espressif.com>
C
apache-2.0
runtimeco/mcuboot,ATmobica/mcuboot,ATmobica/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,runtimeco/mcuboot,runtimeco/mcuboot,ATmobica/mcuboot
fe5717664e4220a0bde701fc3239ef7eabe4f138
MdeModulePkg/Universal/HiiDatabaseDxe/R8Lib.h
MdeModulePkg/Universal/HiiDatabaseDxe/R8Lib.h
/** @file Implement a utility function named R8_EfiLibCompareLanguage. Copyright (c) 2007 - 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 __R8_LIB_H__ #define __R8_LIB_H__ /** Compare whether two names of languages are identical. @param Language1 Name of language 1 @param Language2 Name of language 2 @retval TRUE same @retval FALSE not same **/ BOOLEAN R8_EfiLibCompareLanguage ( IN CHAR8 *Language1, IN CHAR8 *Language2 ) ; #endif
/** @file Implement a utility function named R8_EfiLibCompareLanguage. Copyright (c) 2007 - 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 __R8_LIB_H__ #define __R8_LIB_H__ /** Compare whether two names of languages are identical. @param Language1 Name of language 1 @param Language2 Name of language 2 @retval TRUE same @retval FALSE not same **/ BOOLEAN R8_EfiLibCompareLanguage ( IN CHAR8 *Language1, IN CHAR8 *Language2 ) ; #endif
Update to use DOS format
Update to use DOS format git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@6339 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
2cb139d6f1660d7354a8b9a3e1a86d9bc45aead1
Pod/Classes/Models/LKManager.h
Pod/Classes/Models/LKManager.h
// // LKManager.h // // Created by Vlad Gorbenko on 4/21/15. // Copyright (c) 2015 Vlad Gorbenko. All rights reserved. // #import <Foundation/Foundation.h> #import "LKLanguage.h" extern NSString *const LKLanguageDidChangeNotification; extern NSString *const LKSourceDefault; extern NSString *const LKSourcePlist; NSString *LKLocalizedString(NSString *key, NSString *comment); @interface LKManager : NSObject{ NSDictionary *_vocabluary; } @property (nonatomic, strong) LKLanguage *currentLanguage; @property (nonatomic, readonly) NSArray *languages; + (void)setLocalizationFilename:(NSString *)localizationFilename; + (LKManager*)sharedInstance; + (void)nextLanguage; - (NSString *)titleForKeyPathIdentifier:(NSString *)keyPathIdentifier; + (NSMutableArray *)simpleViews; + (NSMutableArray *)rightToLeftLanguagesCodes; + (void)addLanguage:(LKLanguage *)language; + (void)removeLanguage:(LKLanguage *)language; - (NSString *)setLocalizationSource:(NSString *)source; @end
// // LKManager.h // // Created by Vlad Gorbenko on 4/21/15. // Copyright (c) 2015 Vlad Gorbenko. All rights reserved. // #import <Foundation/Foundation.h> #import "LKLanguage.h" extern NSString *const LKLanguageDidChangeNotification; extern NSString *const LKSourceDefault; extern NSString *const LKSourcePlist; NSString *LKLocalizedString(NSString *key, NSString *comment); @interface LKManager : NSObject{ NSDictionary *_vocabluary; } @property (nonatomic, strong) LKLanguage *currentLanguage; @property (nonatomic, readonly) NSArray *languages; + (void)setLocalizationFilename:(NSString *)localizationFilename; + (LKManager*)sharedInstance; + (void)nextLanguage; - (NSString *)titleForKeyPathIdentifier:(NSString *)keyPathIdentifier; + (NSMutableArray *)simpleViews; + (NSMutableArray *)rightToLeftLanguagesCodes; + (void)addLanguage:(LKLanguage *)language; + (void)removeLanguage:(LKLanguage *)language; - (LKLanguage *)languageByCode:(NSString *)code; - (NSString *)setLocalizationSource:(NSString *)source; @end
Make language by code public.
Make language by code public.
C
mit
mojidabckuu/Loki,mojidabckuu/Loki
fee172d7eafd98a5df3c251ed5065f9e91eb4b2a
coursework/assignment1/matrix_multiplication.c
coursework/assignment1/matrix_multiplication.c
#include <stdio.h> #include <mpi.h> int main(int argc, char *argv[]) { int numprocs, rank, namelen; char processor_name[MPI_MAX_PROCESSOR_NAME]; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Get_processor_name(processor_name, &namelen); // TODO MPI_Finalize(); return 0; }
// mat_x num of rows equals to // mat_a num of rows #define A_ROWS 3 #define X_ROWS 3 // mat_x num of cols equals to // mat_b num of cols #define B_COLS 3 #define X_COLS 3 // mat_a num of cols should be equals to // mat_b num of rows #define A_COLS 2 #define B_ROWS 2 #include <stdio.h> // #include <mpi.h> void print_matrix(char* name, int rows, int cols, int matrix[rows][cols]) { printf("\n%s [%d][%d]\n", name, rows, cols); for (int row = 0; row < rows; row++){ for (int col = 0; col < cols; col++) printf("%d ", matrix[row][col]); printf("\n"); } } int main(int argc, char *argv[]) { int matrix_a [A_ROWS][A_COLS] = { {9, 0}, {5, 6}, {1, 2} }; int matrix_b [B_ROWS][B_COLS] = { {2, 4, 3}, {7, 8, 9} }; int matrix_x [X_ROWS][X_COLS]; // multipy matrices a and b for (int row = 0; row < A_ROWS; row++) { for (int col = 0; col < B_COLS; col++) { int sum = 0; for (int ctrl = 0; ctrl < B_ROWS; ctrl++) sum = sum + matrix_a[row][ctrl] * matrix_b[ctrl][col]; matrix_x[row][col] = sum; } } print_matrix("Matrix A", A_ROWS, A_COLS, matrix_a); print_matrix("Matrix B", B_ROWS, B_COLS, matrix_b); print_matrix("Matrix X", X_ROWS, X_COLS, matrix_x); printf("\n"); // TODO // int numprocs, rank, namelen; // char processor_name[MPI_MAX_PROCESSOR_NAME]; // MPI_Init(&argc, &argv); // MPI_Comm_size(MPI_COMM_WORLD, &numprocs); // MPI_Comm_rank(MPI_COMM_WORLD, &rank); // MPI_Get_processor_name(processor_name, &namelen); // MPI_Finalize(); return 0; }
Add matrix multiplication code in C
Add matrix multiplication code in C
C
mit
arthurazs/uff-lpp,arthurazs/uff-lpp,arthurazs/uff-lpp
d0ae779c15cfa916a186dff8872e2a3f4401c2d3
snapshots/hacl-c/Random.h
snapshots/hacl-c/Random.h
/* This file was auto-generated by KreMLin! */ #ifndef __Random_H #define __Random_H #include "kremlib.h" #include "config.h" #include "drng.h" #include "cpuid.h" typedef uint8_t u8; typedef uint32_t u32; typedef uint64_t u64; typedef uint8_t *bytes; uint32_t random_uint32(); uint64_t random_uint64(); void random_bytes(uint8_t *rand, uint32_t n); uint32_t randseed_uint32(); uint64_t randseed_uint64(); #endif
/* This file was auto-generated by KreMLin! */ #ifndef __Random_H #define __Random_H #include "kremlib.h" #include "config.h" #include "drng.h" #include "cpuid.h" typedef uint8_t u8; typedef uint32_t u32; typedef uint64_t u64; uint32_t random_uint32(); uint64_t random_uint64(); void random_bytes(uint8_t *rand, uint32_t n); uint32_t randseed_uint32(); uint64_t randseed_uint64(); #endif
Remove a redifinition of type 'bytes'
Remove a redifinition of type 'bytes'
C
apache-2.0
mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star
32adade0be324e7280a606adaaa17279ab2b7c7d
doxygen/main_page.c
doxygen/main_page.c
/** @mainpage M-Stack @section Intro This is M-Stack, a free USB Device Stack for PIC Microcontrollers. For more information, see the <a href="group__public__api.html">Public API Page.</a> */
/** @mainpage M-Stack @section Intro This is M-Stack, a free USB Device Stack for PIC Microcontrollers. For more information, see the <a href="http://www.signal11.us/oss/m-stack">main web page.</a> For API documentation, see the <a href="group__public__api.html">Public API Page.</a> */
Add web page link to the main doxygen page
doxygen: Add web page link to the main doxygen page
C
apache-2.0
rollingstone/m-stack,rollingstone/m-stack,pololu/m-stack,pololu/m-stack
4dc1a5ab19c9cc8a84d726d4a01d0e3ea75644b9
include/fish_detector/common/species_dialog.h
include/fish_detector/common/species_dialog.h
/// @file /// @brief Defines SpeciedDialog class. #ifndef SPECIES_DIALOG_H #define SPECIES_DIALOG_H namespace fish_detector { class SpeciesDialog : public QDialog { Q_OBJECT #ifndef NO_TESTING friend class TestSpeciesDialog; #endif public: /// @brief Constructor. /// /// @param parent Parent widget. explicit SpeciesDialog(QWidget *parent = 0); private slots: /// @brief Emits the accepted signal. void on_ok_clicked(); /// @brief Emits the rejected signal. void on_cancel_clicked(); /// @brief Removes currently selected subspecies. void on_removeSubspecies_clicked(); /// @brief Adds a new subspecies. void on_addSubspecies_clicked(); /// @brief Returns a Species object corresponding to the dialog values. /// /// @return Species object corresponding to the dialog values. Species getSpecies(); }; } // namespace fish_detector #endif // SPECIES_DIALOG_H
/// @file /// @brief Defines SpeciesDialog class. #ifndef SPECIES_DIALOG_H #define SPECIES_DIALOG_H #include <memory> #include <QWidget> #include <QDialog> #include "fish_detector/common/species.h" namespace Ui { class SpeciesDialog; } namespace fish_detector { class SpeciesDialog : public QDialog { Q_OBJECT #ifndef NO_TESTING friend class TestSpeciesDialog; #endif public: /// @brief Constructor. /// /// @param parent Parent widget. explicit SpeciesDialog(QWidget *parent = 0); /// @brief Returns a Species object corresponding to the dialog values. /// /// @return Species object corresponding to the dialog values. Species getSpecies(); private slots: /// @brief Emits the accepted signal. void on_ok_clicked(); /// @brief Emits the rejected signal. void on_cancel_clicked(); /// @brief Removes currently selected subspecies. void on_removeSubspecies_clicked(); /// @brief Adds a new subspecies. void on_addSubspecies_clicked(); private: /// @brief Widget loaded from ui file. std::unique_ptr<Ui::SpeciesDialog> ui_; }; } // namespace fish_detector #endif // SPECIES_DIALOG_H
Add function returning Species object
Add function returning Species object
C
mit
BGWoodward/FishDetector
5fff847531ede017aeabc7e38264f438748b5493
webkit/plugins/ppapi/ppp_pdf.h
webkit/plugins/ppapi/ppp_pdf.h
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_ #define WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_point.h" #include "ppapi/c/pp_var.h" #define PPP_PDF_INTERFACE_1 "PPP_Pdf;1" struct PPP_Pdf_1 { // Returns an absolute URL if the position is over a link. PP_Var (*GetLinkAtPosition)(PP_Instance instance, PP_Point point); }; typedef PPP_Pdf_1 PPP_Pdf; #endif // WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_ #define WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_point.h" #include "ppapi/c/pp_var.h" #define PPP_PDF_INTERFACE_1 "PPP_Pdf;1" #define PPP_PDF_INTERFACE PPP_PDF_INTERFACE_1 struct PPP_Pdf_1 { // Returns an absolute URL if the position is over a link. PP_Var (*GetLinkAtPosition)(PP_Instance instance, PP_Point point); }; typedef PPP_Pdf_1 PPP_Pdf; #endif // WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_
Add missing unversioned interface-name macro for PPP_Pdf.
Add missing unversioned interface-name macro for PPP_Pdf. BUG=107398 Review URL: http://codereview.chromium.org/9114010 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@116504 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium
e62cfdcc7390d420833d2bead953d8e172719f37
src/dst.c
src/dst.c
#include "syshead.h" #include "dst.h" #include "ip.h" #include "arp.h" int dst_neigh_output(struct sk_buff *skb) { struct iphdr *iphdr = ip_hdr(skb); struct netdev *netdev = skb->netdev; uint8_t *dmac = arp_get_hwaddr(iphdr->daddr); int rc; if (dmac) { return netdev_transmit(skb, dmac, ETH_P_IP); } else { rc = arp_request(iphdr->saddr, iphdr->daddr, netdev); free_skb(skb); return rc; } }
#include "syshead.h" #include "dst.h" #include "ip.h" #include "arp.h" int dst_neigh_output(struct sk_buff *skb) { struct iphdr *iphdr = ip_hdr(skb); struct netdev *netdev = skb->netdev; uint8_t *dmac = arp_get_hwaddr(iphdr->daddr); int rc; if (dmac) { return netdev_transmit(skb, dmac, ETH_P_IP); } else { rc = arp_request(iphdr->saddr, iphdr->daddr, netdev); while ((dmac = arp_get_hwaddr(iphdr->daddr)) == NULL) { sleep(1); } return netdev_transmit(skb, dmac, ETH_P_IP); } }
Add ugly hack for waiting that ARP cache gets populated
Add ugly hack for waiting that ARP cache gets populated We do not have a retransmission system implemented yet, so let's sleep here for a while in order to get the ARP entry if it is missing.
C
mit
saminiir/level-ip,saminiir/level-ip
813b100e98470a3dca5116895e37cadfae1e7c2d
util/cpp/db/util/Macros.h
util/cpp/db/util/Macros.h
/* * Copyright (c) 2008 Digital Bazaar, Inc. All rights reserved. */ #ifndef db_util_Macros_H #define db_util_Macros_H /** * Miscellaneous general use macros. */ /** * Macro statement wrapper. Adapted from glib. * Use: * if(x) DB_STMT_START { ... } DB_STMT_END; else ... */ #define DB_STMT_START do #define DB_STMT_END while (0) /** * Convert argument to a string */ #define DB_STRINGIFY(arg) #arg /** * String representing the current code location. */ #define DB_STRLOC __FILE__ ":" DB_STRINGIFY(__LINE__) #endif
/* * Copyright (c) 2008 Digital Bazaar, Inc. All rights reserved. */ #ifndef db_util_Macros_H #define db_util_Macros_H /** * Miscellaneous general use macros. */ /** * Macro statement wrapper. Adapted from glib. * Use: * if(x) DB_STMT_START { ... } DB_STMT_END; else ... */ #define DB_STMT_START do #define DB_STMT_END while (0) /** * Convert argument to a string */ #define DB_STRINGIFY_ARG(arg) #arg #define DB_STRINGIFY(arg) DB_STRINGIFY_ARG(arg) /** * String representing the current code location. */ #define DB_STRLOC __FILE__ ":" DB_STRINGIFY(__LINE__) #endif
Fix DB_STRINGIFY to indirectly convert arg to a string.
Fix DB_STRINGIFY to indirectly convert arg to a string.
C
agpl-3.0
digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch
c888133119dece5f3a60a1f02a8a3c3916898206
test/Sema/no-format-y2k-turnsoff-format.c
test/Sema/no-format-y2k-turnsoff-format.c
// RUN: %clang_cc1 -verify -fsyntax-only -Wformat -Wno-format-y2k // rdar://9504680 void foo(const char *, ...) __attribute__((__format__ (__printf__, 1, 2))); void bar(unsigned int a) { foo("%s", a); // expected-warning {{format specifies type 'char *' but the argument has type 'unsigned int'}} }
// RUN: %clang_cc1 -verify -fsyntax-only -Wformat -Wno-format-y2k %s // rdar://9504680 void foo(const char *, ...) __attribute__((__format__ (__printf__, 1, 2))); void bar(unsigned int a) { foo("%s", a); // expected-warning {{format specifies type 'char *' but the argument has type 'unsigned int'}} }
Make this test actually test something
Make this test actually test something git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@164677 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
7bdd3703e4012446a446b66580e66f4fa80db07e
lib/src/clacks-api/clacks.c
lib/src/clacks-api/clacks.c
#include "clacks_common.h" #include "id_client.h" #include "TraceMessage.pb-c.h" #include "../transport-client/cl_transport_domsock_client.h" #include <stdio.h> #include "clacks.h" /* API Back-End */ void _clacks_trace_string_id(char *str, char *id) { int ret; TraceMessage t_msg = TRACE_MESSAGE__INIT; t_msg.act_id = "TEST"; t_msg.msg = str; t_msg.flags = 0; ret = send_trace_message(&t_msg); } /* API Front-End */ void clacks_trace_string(char *str) { clacks_trace_string_id(str, "NULLID"); } void clacks_trace_string_id(char *str, char *id) { if (str != NULL && id != NULL) { _clacks_trace_string_id(str, id); } } int clacks_new_id(char *id) { if (id == NULL) { return -1; } return get_new_id(id); }
#include "clacks_common.h" #include "id_client.h" #include "TraceMessage.pb-c.h" #include "../transport-client/cl_transport_domsock_client.h" #include <stdio.h> #include "clacks.h" /* API Back-End */ void _clacks_trace_string_id(char *str, char *id) { int ret; TraceMessage t_msg = TRACE_MESSAGE__INIT; t_msg.act_id = id; t_msg.msg = str; t_msg.flags = 0; ret = send_trace_message(&t_msg); } /* API Front-End */ void clacks_trace_string(char *str) { clacks_trace_string_id(str, "NULLID"); } void clacks_trace_string_id(char *str, char *id) { if (str != NULL && id != NULL) { _clacks_trace_string_id(str, id); } } int clacks_new_id(char *id) { if (id == NULL) { return -1; } return get_new_id(id); }
Set the id for the trace message
Set the id for the trace message
C
mit
jamessnee/clacks,jamessnee/clacks,jamessnee/clacks
1d6e54c49babe1975a1b6285e8b7f039c04b3ab3
muduo/base/Atomic.h
muduo/base/Atomic.h
#ifndef MUDUO_BASE_ATOMIC_H #define MUDUO_BASE_ATOMIC_H #include <boost/noncopyable.hpp> namespace muduo { class AtomicInt64 : boost::noncopyable { public: AtomicInt64() : value_(0) { } int64_t get() { return value_; } int64_t addAndGet(int64_t x) { value_ += x; return value_; } int64_t incrementAndGet() { return addAndGet(1); } int64_t getAndSet(int64_t newValue) { int64_t old = value_; value_ = newValue; return old; } private: int64_t value_; }; } #endif // MUDUO_BASE_ATOMIC_H
#ifndef MUDUO_BASE_ATOMIC_H #define MUDUO_BASE_ATOMIC_H #include <boost/noncopyable.hpp> namespace muduo { class AtomicInt64 : boost::noncopyable { public: AtomicInt64() : value_(0) { } int64_t get() { return value_; } int64_t addAndGet(int64_t x) { return __sync_add_and_fetch(&value_, x); } int64_t incrementAndGet() { return addAndGet(1); } int64_t getAndSet(int64_t newValue) { return __sync_lock_test_and_set(&value_, newValue); } private: volatile int64_t value_; }; } #endif // MUDUO_BASE_ATOMIC_H
Implement atomic integer with gcc builtins.
Implement atomic integer with gcc builtins.
C
bsd-3-clause
wangweihao/muduo,Cofyc/muduo,jxd134/muduo,shenhzou654321/muduo,floristt/muduo,floristt/muduo,SuperMXC/muduo,Cofyc/muduo,lvshiling/muduo,fc500110/muduo,danny200309/muduo,jerk1991/muduo,lizj3624/http-github.com-chenshuo-muduo-,jxd134/muduo,SourceInsight/muduo,zhuangshi23/muduo,SourceInsight/muduo,devsoulwolf/muduo,shenhzou654321/muduo,KunYi/muduo,devsoulwolf/muduo,lizj3624/muduo,KublaikhanGeek/muduo,DongweiLee/muduo,KingLebron/muduo,KublaikhanGeek/muduo,KingLebron/muduo,danny200309/muduo,yunhappy/muduo,shuang-shuang/muduo,DongweiLee/muduo,mitliucak/muduo,tsh185/muduo,danny200309/muduo,guker/muduo,huan80s/muduo,dhanzhang/muduo,lizj3624/muduo,yunhappy/muduo,floristt/muduo,SourceInsight/muduo,lvmaoxv/muduo,KingLebron/muduo,tsh185/muduo,wangweihao/muduo,lizj3624/http-github.com-chenshuo-muduo-,zhanMingming/muduo,lizj3624/muduo,Cofyc/muduo,ucfree/muduo,decimalbell/muduo,ywy2090/muduo,KingLebron/muduo,xzmagic/muduo,lizj3624/http-github.com-chenshuo-muduo-,wangweihao/muduo,dhanzhang/muduo,dhanzhang/muduo,SuperMXC/muduo,guker/muduo,SourceInsight/muduo,ucfree/muduo,decimalbell/muduo,shenhzou654321/muduo,fc500110/muduo,devsoulwolf/muduo,floristt/muduo,zhuangshi23/muduo,lizj3624/muduo,zxylvlp/muduo,huan80s/muduo,jerk1991/muduo,wangweihao/muduo,mitliucak/muduo,lizj3624/http-github.com-chenshuo-muduo-,lizhanhui/muduo,flyfeifan/muduo,mitliucak/muduo,Cofyc/muduo,Cofyc/muduo,westfly/muduo,xzmagic/muduo,mitliucak/muduo,mitliucak/muduo,decimalbell/muduo,decimalbell/muduo,daodaoliang/muduo,westfly/muduo,penyatree/muduo,devsoulwolf/muduo,danny200309/muduo,penyatree/muduo,wangweihao/muduo,pthreadself/muduo,SuperMXC/muduo,kidzyoung/muduo,pthreadself/muduo,lizj3624/http-github.com-chenshuo-muduo-,lizj3624/muduo,huan80s/muduo,ucfree/muduo,youprofit/muduo,zouzl/muduo-learning,ucfree/muduo,zhanMingming/muduo,daodaoliang/muduo,floristt/muduo,shenhzou654321/muduo,dhanzhang/muduo,KunYi/muduo,june505/muduo,lizhanhui/muduo,decimalbell/muduo,shuang-shuang/muduo,zxylvlp/muduo,dhanzhang/muduo,ywy2090/muduo,youprofit/muduo,june505/muduo,SuperMXC/muduo,zouzl/muduo-learning,danny200309/muduo,devsoulwolf/muduo,flyfeifan/muduo,zhuangshi23/muduo,lvmaoxv/muduo,ucfree/muduo,nestle1998/muduo,zxylvlp/muduo,SuperMXC/muduo,shenhzou654321/muduo,huan80s/muduo,KingLebron/muduo,kidzyoung/muduo,lvshiling/muduo,huan80s/muduo,zouzl/muduo-learning,SourceInsight/muduo,nestle1998/muduo,westfly/muduo
8127f3a6e6c615856006842cee6df2e13c1ba852
test/CFrontend/2007-06-18-SextAttrAggregate.c
test/CFrontend/2007-06-18-SextAttrAggregate.c
// RUN: %llvmgcc %s -o - -S -emit-llvm -O3 | grep {i8 signext} // PR1513 struct s{ long a; long b; }; void f(struct s a, char *b, char C) { }
// RUN: %llvmgcc %s -o - -S -emit-llvm -O3 | grep {i8 signext} // PR1513 struct s{ long a; long b; }; void f(struct s a, char *b, signed char C) { }
Make this explictly signed. Fixes PR1571.
Make this explictly signed. Fixes PR1571. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@40569 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm
b89efa2cd07719696316128da95a2c56088141e1
Core/DataStructures/mitkVideoSource.h
Core/DataStructures/mitkVideoSource.h
#ifndef _mitk_Video_Source_h_ #define _mitk_Video_Source_h_ #include "mitkCommon.h" #include <itkObject.h> #include "itkObjectFactory.h" namespace mitk { /** * Simple base class for acquiring video data. */ class VideoSource //: public itk::Object { public: //mitkClassMacro( VideoSource, itk::Object ); //itkNewMacro( Self ); VideoSource(); virtual ~VideoSource(); ////##Documentation ////## @brief assigns the grabbing devices for acquiring the next frame. virtual void FetchFrame(); ////##Documentation ////## @brief returns a pointer to the image data array for opengl rendering. virtual unsigned char * GetVideoTexture(); ////##Documentation ////## @brief starts the video capturing. virtual void StartCapturing(); ////##Documentation ////## @brief stops the video capturing. virtual void StopCapturing(); ////##Documentation ////## @brief returns true if video capturing is active. bool IsCapturingEnabled(); protected: unsigned char * m_CurrentVideoTexture; int m_CaptureWidth, m_CaptureHeight; bool m_CapturingInProcess; }; } #endif // Header
#ifndef _mitk_Video_Source_h_ #define _mitk_Video_Source_h_ #include "mitkCommon.h" #include <itkObject.h> #include "itkObjectFactory.h" namespace mitk { /** * Simple base class for acquiring video data. */ class VideoSource //: public itk::Object { public: //mitkClassMacro( VideoSource, itk::Object ); //itkNewMacro( Self ); VideoSource(); virtual ~VideoSource(); ////##Documentation ////## @brief assigns the grabbing devices for acquiring the next frame. virtual void FetchFrame(); ////##Documentation ////## @brief returns a pointer to the image data array for opengl rendering. virtual unsigned char * GetVideoTexture(); ////##Documentation ////## @brief starts the video capturing. virtual void StartCapturing(); ////##Documentation ////## @brief stops the video capturing. virtual void StopCapturing(); ////##Documentation ////## @brief returns true if video capturing is active. bool IsCapturingEnabled(); protected: unsigned char * m_CurrentVideoTexture; int m_CaptureWidth, m_CaptureHeight; bool m_CapturingInProcess; }; } #endif // Header
FIX warnings: newline at end of file
FIX warnings: newline at end of file
C
bsd-3-clause
fmilano/mitk,danielknorr/MITK,lsanzdiaz/MITK-BiiG,danielknorr/MITK,nocnokneo/MITK,NifTK/MITK,fmilano/mitk,lsanzdiaz/MITK-BiiG,MITK/MITK,rfloca/MITK,danielknorr/MITK,iwegner/MITK,fmilano/mitk,lsanzdiaz/MITK-BiiG,iwegner/MITK,danielknorr/MITK,lsanzdiaz/MITK-BiiG,fmilano/mitk,MITK/MITK,fmilano/mitk,rfloca/MITK,fmilano/mitk,nocnokneo/MITK,NifTK/MITK,NifTK/MITK,nocnokneo/MITK,fmilano/mitk,lsanzdiaz/MITK-BiiG,nocnokneo/MITK,iwegner/MITK,nocnokneo/MITK,MITK/MITK,nocnokneo/MITK,nocnokneo/MITK,NifTK/MITK,MITK/MITK,MITK/MITK,iwegner/MITK,iwegner/MITK,NifTK/MITK,lsanzdiaz/MITK-BiiG,RabadanLab/MITKats,rfloca/MITK,RabadanLab/MITKats,RabadanLab/MITKats,iwegner/MITK,NifTK/MITK,rfloca/MITK,MITK/MITK,rfloca/MITK,rfloca/MITK,RabadanLab/MITKats,lsanzdiaz/MITK-BiiG,lsanzdiaz/MITK-BiiG,danielknorr/MITK,RabadanLab/MITKats,danielknorr/MITK,rfloca/MITK,RabadanLab/MITKats,danielknorr/MITK
e434cc2a4d7de10c15ecf18ba27be5819e247910
include/llvm/Option/OptSpecifier.h
include/llvm/Option/OptSpecifier.h
//===--- OptSpecifier.h - Option Specifiers ---------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_OPTION_OPTSPECIFIER_H #define LLVM_OPTION_OPTSPECIFIER_H namespace llvm { namespace opt { class Option; /// OptSpecifier - Wrapper class for abstracting references to option IDs. class OptSpecifier { unsigned ID; private: explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION; public: OptSpecifier() : ID(0) {} /*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {} /*implicit*/ OptSpecifier(const Option *Opt); bool isValid() const { return ID != 0; } unsigned getID() const { return ID; } bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); } bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); } }; } } #endif
//===--- OptSpecifier.h - Option Specifiers ---------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_OPTION_OPTSPECIFIER_H #define LLVM_OPTION_OPTSPECIFIER_H #include "llvm/Support/Compiler.h" namespace llvm { namespace opt { class Option; /// OptSpecifier - Wrapper class for abstracting references to option IDs. class OptSpecifier { unsigned ID; private: explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION; public: OptSpecifier() : ID(0) {} /*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {} /*implicit*/ OptSpecifier(const Option *Opt); bool isValid() const { return ID != 0; } unsigned getID() const { return ID; } bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); } bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); } }; } } #endif
Add missing include, found by modules build.
Add missing include, found by modules build. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@207158 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap
baa4007881f894ff8c0a04b71002d53f4fe9572a
kernel/x86/tests/lock.c
kernel/x86/tests/lock.c
#include <kernel/x86/lock.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <pthread.h> static volatile int counter; static mutex_t lock; void *do_thread(void *arg) { int sign = (int)arg; for(int i = 0; i < 100000; i++) { wait_aquire(&lock); counter += sign; release(&lock); } return NULL; } void panic(char *s) { fprintf(stderr, "%s\n", s); exit(1); } int main(void) { pthread_t incr, decr; pthread_create(&incr, NULL, do_thread, (void *)1); pthread_create(&decr, NULL, do_thread, (void *)-1); pthread_join(incr, NULL); pthread_join(decr, NULL); if(counter != 0) { panic("Counter is non-zero!"); } return 0; }
#include <kernel/arch/lock.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <pthread.h> static volatile int counter; static mutex_t lock; void *do_thread(void *arg) { int sign = (int)arg; for(int i = 0; i < 100000; i++) { wait_aquire(&lock); counter += sign; release(&lock); } return NULL; } void panic(char *s) { fprintf(stderr, "%s\n", s); exit(1); } int main(void) { pthread_t incr, decr; pthread_create(&incr, NULL, do_thread, (void *)1); pthread_create(&decr, NULL, do_thread, (void *)-1); pthread_join(incr, NULL); pthread_join(decr, NULL); if(counter != 0) { panic("Counter is non-zero!"); } return 0; }
Fix bitrotted include in test
Fix bitrotted include in test
C
isc
zenhack/zero,zenhack/zero,zenhack/zero
84e98bde6e98ab033b63393efc2741e260a63253
include/lldb/Host/PosixApi.h
include/lldb/Host/PosixApi.h
//===-- PosixApi.h ----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_Host_PosixApi_h #define liblldb_Host_PosixApi_h // This file defines platform specific functions, macros, and types necessary // to provide a minimum level of compatibility across all platforms to rely // on various posix api functionality. #include "llvm/Support/Compiler.h" #if defined(LLVM_ON_WIN32) #include "lldb/Host/windows/PosixApi.h" #endif #endif
//===-- PosixApi.h ----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_Host_PosixApi_h #define liblldb_Host_PosixApi_h // This file defines platform specific functions, macros, and types necessary // to provide a minimum level of compatibility across all platforms to rely // on various posix api functionality. #include "llvm/Support/Compiler.h" #if defined(LLVM_ON_WIN32) #include "lldb/Host/windows/PosixApi.h" #endif #endif
Add a newline to the end of the file to remove the clang warnings.
Add a newline to the end of the file to remove the clang warnings. git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@278188 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb
0b7aa15019283753a620c908deea7bab4da1f94d
libcassandra/util/platform.h
libcassandra/util/platform.h
/* * LibCassandra * Copyright (C) 2010-2011 Padraig O'Sullivan, Ewen Cheslack-Postava * All rights reserved. * * Use and distribution licensed under the BSD license. See * the COPYING file in the parent directory for full text. */ #ifndef __LIBCASSANDRA_UTIL_PLATFORM_H #define __LIBCASSANDRA_UTIL_PLATFORM_H #include <boost/tr1/memory.hpp> #include <boost/tr1/tuple.hpp> #include <boost/tr1/unordered_map.hpp> #include <string> #include <vector> #include <map> #include <set> #endif //__LIBCASSANDRA_UTIL_PLATFORM_H
/* * LibCassandra * Copyright (C) 2010-2011 Padraig O'Sullivan, Ewen Cheslack-Postava * All rights reserved. * * Use and distribution licensed under the BSD license. See * the COPYING file in the parent directory for full text. */ #ifndef __LIBCASSANDRA_UTIL_PLATFORM_H #define __LIBCASSANDRA_UTIL_PLATFORM_H #ifdef __GNUC__ // #include_next is broken: it does not search default include paths! #define BOOST_TR1_DISABLE_INCLUDE_NEXT // config_all.hpp reads this variable, then sets BOOST_HAS_INCLUDE_NEXT anyway #include <boost/tr1/detail/config_all.hpp> #ifdef BOOST_HAS_INCLUDE_NEXT // This behavior has existed since boost 1.34, unlikely to change. #undef BOOST_HAS_INCLUDE_NEXT #endif #endif #endif #include <boost/tr1/memory.hpp> #include <boost/tr1/tuple.hpp> #include <boost/tr1/unordered_map.hpp> #include <string> #include <vector> #include <map> #include <set> #endif //__LIBCASSANDRA_UTIL_PLATFORM_H
Disable boost's include_next functionality, fixes compatibility with Sirikata.
Disable boost's include_next functionality, fixes compatibility with Sirikata.
C
bsd-3-clause
xiaozhou/libcassandra,xiaozhou/libcassandra,xiaozhou/libcassandra,xiaozhou/libcassandra
3c409aa80a2d40b21277cdbddf879a376814e315
src/config_traits.h
src/config_traits.h
#include <type_traits> template<typename T> struct is_config_type:std::integral_constant<bool,false>{}; template<> struct is_config_type <bool>: std::integral_constant<bool,true>{}; template<> struct is_config_type <int>: std::integral_constant<bool,true>{}; template<> struct is_config_type <long>: std::integral_constant<bool,true>{}; template<> struct is_config_type <long long>: std::integral_constant<bool,true>{}; template<> struct is_config_type <unsigned int>: std::integral_constant<bool,true>{}; template<> struct is_config_type <unsigned long>: std::integral_constant<bool,true>{}; template<> struct is_config_type <unsigned long long>: std::integral_constant<bool,true>{}; template<> struct is_config_type <float>: std::integral_constant<bool,true>{}; template<> struct is_config_type <double>: std::integral_constant<bool,true>{}; template<> struct is_config_type <long double>: std::integral_constant<bool,true>{}; template<> struct is_config_type <std::string>: std::integral_constant<bool,true>{};
#include <type_traits> template<typename T> struct is_config_type: std::false_type{}; template<> struct is_config_type <bool>: std::true_type{}; template<> struct is_config_type <int>: std::true_type{}; template<> struct is_config_type <long>: std::true_type{}; template<> struct is_config_type <long long>: std::true_type{}; template<> struct is_config_type <unsigned int>: std::true_type{}; template<> struct is_config_type <unsigned long>: std::true_type{}; template<> struct is_config_type <unsigned long long>: std::true_type{}; template<> struct is_config_type <float>: std::true_type{}; template<> struct is_config_type <double>: std::true_type{}; template<> struct is_config_type <long double>: std::true_type{}; template<> struct is_config_type <std::string>: std::true_type{};
Change integral_constant<bool> to true_type and false_type.
Change integral_constant<bool> to true_type and false_type.
C
mit
actinium/cppConfig
588dcc093d81a4acfac699195641dfa26571d2a1
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 95 #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 96 #endif
Update Skia milestone to 96
Update Skia milestone to 96 Change-Id: I635df8267340a9068b80a2e6c001958cfb2d10e4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447578 Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Reviewed-by: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com> Auto-Submit: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Commit-Queue: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
C
bsd-3-clause
google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/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,aosp-mirror/platform_external_skia,google/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
7d8b06f783652f8464b9985d07a0c9ba2ce4e202
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 66 #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 67 #endif
Update Skia milestone to 67
Update Skia milestone to 67 TBR: reed Bug: skia: Change-Id: I11a5515c41d5bb7ed95294fdb63668c35d14d960 Reviewed-on: https://skia-review.googlesource.com/111326 Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
C
bsd-3-clause
google/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,google/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,rubenvb/skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia
1dfa8ad98b49171049e224a2fe2a33176c6bf779
include/sigar_visibility.h
include/sigar_visibility.h
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2013 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SIGAR_VISIBILITY_H #define SIGAR_VISIBILITY_H 1 #ifdef BUILDING_SIGAR #if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550) #define SIGAR_PUBLIC_API __global #elif defined __GNUC__ #define SIGAR_PUBLIC_API __attribute__ ((visibility("default"))) #elif defined(_MSC_VER) #define SIGAR_PUBLIC_API __declspec(dllexport) #else /* unknown compiler */ #define SIGAR_PUBLIC_API #endif #else #if defined(_MSC_VER) #define SIGAR_PUBLIC_API __declspec(dllimport) #else #define SIGAR_PUBLIC_API #endif #endif #endif /* SIGAR_VISIBILITY_H */
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2013 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #ifdef BUILDING_SIGAR #if defined(__GNUC__) #define SIGAR_PUBLIC_API __attribute__ ((visibility("default"))) #elif defined(_MSC_VER) #define SIGAR_PUBLIC_API __declspec(dllexport) #else /* unknown compiler */ #define SIGAR_PUBLIC_API #endif #else #if defined(_MSC_VER) #define SIGAR_PUBLIC_API __declspec(dllimport) #else #define SIGAR_PUBLIC_API #endif #endif
Remove support for Sun Studio compiler
Remove support for Sun Studio compiler Change-Id: I7fb2ac0cd9942fad79eb874604dc48e02a0d01db Reviewed-on: https://review.couchbase.org/c/sigar/+/166582 Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com> Reviewed-by: Paolo Cocchi <9dd88c9f3e5cbab6e19a6c020f107e0c648ac956@couchbase.com>
C
apache-2.0
couchbase/sigar,couchbase/sigar
4d3b0456778961c5a8af919a7c1fcf60a8658bf4
kernel/kernel/resourceManager.c
kernel/kernel/resourceManager.c
#include "resourceManager.h" #include "kernelHeap.h" //allocates frames MemoryResource *create_memoryResource(unsigned int size) { MemoryResource *memRes; memRes = kmalloc(sizeof(MemoryResource)); return memRes; }
#include "resourceManager.h" #include "kernelHeap.h" //allocates frames MemoryResource *create_memoryResource(unsigned int size) { MemoryResource *memRes; memRes = (MemoryResource*)kmalloc(sizeof(MemoryResource)); return memRes; }
Use type casts from void
Use type casts from void
C
mit
povilasb/simple-os,povilasb/simple-os
4c7c2cb4711297c1e5eefad723ab3b1db27d1614
include/parrot/stacks.h
include/parrot/stacks.h
/* stacks.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Stack handling routines for Parrot * Data Structure and Algorithms: * History: * Notes: * References: */ #if !defined(PARROT_STACKS_H_GUARD) #define PARROT_STACKS_H_GUARD #include "parrot/parrot.h" #define STACK_CHUNK_DEPTH 256 struct Stack_Entry { INTVAL entry_type; INTVAL flags; void (*cleanup)(struct Stack_Entry *); union { FLOATVAL num_val; INTVAL int_val; PMC *pmc_val; STRING *string_val; void *generic_pointer; } entry; }; struct Stack { INTVAL used; INTVAL free; struct StackChunk *next; struct StackChunk *prev; struct Stack_Entry entry[STACK_CHUNK_DEPTH]; }; struct Stack_Entry *push_generic_entry(struct Perl_Interp *, void *thing, INTVAL type, void *cleanup); void *pop_generic_entry(struct Perl_Interp *, void *where, INTVAL type); void toss_geleric_entry(struct Perl_Interp *, INTVAL type); #endif /* * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 * indent-tabs-mode: nil * End: * * vim: expandtab shiftwidth=4: */
/* stacks.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Stack handling routines for Parrot * Data Structure and Algorithms: * History: * Notes: * References: */ #if !defined(PARROT_STACKS_H_GUARD) #define PARROT_STACKS_H_GUARD #include "parrot/parrot.h" #define STACK_CHUNK_DEPTH 256 struct Stack_Entry { INTVAL entry_type; INTVAL flags; void (*cleanup)(struct Stack_Entry *); union { FLOATVAL num_val; INTVAL int_val; PMC *pmc_val; STRING *string_val; void *generic_pointer; } entry; }; struct Stack { INTVAL used; INTVAL free; struct StackChunk *next; struct StackChunk *prev; struct Stack_Entry entry[STACK_CHUNK_DEPTH]; }; struct Stack_Entry *push_generic_entry(struct Perl_Interp *, void *thing, INTVAL type, void *cleanup); void *pop_generic_entry(struct Perl_Interp *, void *where, INTVAL type); void toss_generic_entry(struct Perl_Interp *, INTVAL type); #endif /* * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 * indent-tabs-mode: nil * End: * * vim: expandtab shiftwidth=4: */
Fix typo in function name
Fix typo in function name git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@255 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
C
artistic-2.0
ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot
8d8fbf94c3fc783a1becafb9efa6db8f4d0985f1
ext/mysql2/mysql2_ext.h
ext/mysql2/mysql2_ext.h
#ifndef MYSQL2_EXT #define MYSQL2_EXT void Init_mysql2(void); /* tell rbx not to use it's caching compat layer by doing this we're making a promise to RBX that we'll never modify the pointers we get back from RSTRING_PTR */ #define RSTRING_NOT_MODIFIED #include <ruby.h> #ifdef HAVE_MYSQL_H #include <mysql.h> #include <mysql_com.h> #include <errmsg.h> #include <mysqld_error.h> #else #include <mysql/mysql.h> #include <mysql/mysql_com.h> #include <mysql/errmsg.h> #include <mysql/mysqld_error.h> #endif #ifdef HAVE_RUBY_ENCODING_H #include <ruby/encoding.h> #endif #ifdef HAVE_RUBY_THREAD_H #include <ruby/thread.h> #endif #if defined(__GNUC__) && (__GNUC__ >= 3) #define RB_MYSQL_NORETURN __attribute__ ((noreturn)) #define RB_MYSQL_UNUSED __attribute__ ((unused)) #else #define RB_MYSQL_NORETURN #define RB_MYSQL_UNUSED #endif #include <client.h> #include <statement.h> #include <result.h> #include <infile.h> #endif
#ifndef MYSQL2_EXT #define MYSQL2_EXT void Init_mysql2(void); /* tell rbx not to use it's caching compat layer by doing this we're making a promise to RBX that we'll never modify the pointers we get back from RSTRING_PTR */ #define RSTRING_NOT_MODIFIED #include <ruby.h> #ifdef HAVE_MYSQL_H #include <mysql.h> #include <errmsg.h> #include <mysqld_error.h> #else #include <mysql/mysql.h> #include <mysql/errmsg.h> #include <mysql/mysqld_error.h> #endif #ifdef HAVE_RUBY_ENCODING_H #include <ruby/encoding.h> #endif #ifdef HAVE_RUBY_THREAD_H #include <ruby/thread.h> #endif #if defined(__GNUC__) && (__GNUC__ >= 3) #define RB_MYSQL_NORETURN __attribute__ ((noreturn)) #define RB_MYSQL_UNUSED __attribute__ ((unused)) #else #define RB_MYSQL_NORETURN #define RB_MYSQL_UNUSED #endif #include <client.h> #include <statement.h> #include <result.h> #include <infile.h> #endif
Include mysql_com.h has been here for ages but was superfluous
Include mysql_com.h has been here for ages but was superfluous
C
mit
kamipo/mysql2,kamipo/mysql2,sodabrew/mysql2,sodabrew/mysql2,tamird/mysql2,jeremy/mysql2,brianmario/mysql2,jeremy/mysql2,bigcartel/mysql2,brianmario/mysql2,tamird/mysql2,jeremy/mysql2,kamipo/mysql2,brianmario/mysql2,kamipo/mysql2,tamird/mysql2,sodabrew/mysql2,bigcartel/mysql2,bigcartel/mysql2,tamird/mysql2,bigcartel/mysql2
89826f41bd5c96e6b13692d03d08049c912b9365
cat.c
cat.c
#include "types.h" #include "stat.h" #include "user.h" char buf[512]; void cat(int fd) { int n; while((n = read(fd, buf, sizeof(buf))) > 0) write(1, buf, n); if(n < 0){ printf(1, "cat: read error\n"); exit(); } } int main(int argc, char *argv[]) { int fd, i; if(argc <= 1){ cat(0); exit(); } for(i = 1; i < argc; i++){ if((fd = open(argv[i], 0)) < 0){ printf(1, "cat: cannot open %s\n", argv[i]); exit(); } cat(fd); close(fd); } exit(); }
#include "types.h" #include "stat.h" #include "user.h" char buf[512]; void cat(int fd) { int n; while((n = read(fd, buf, sizeof(buf))) > 0) { if (write(1, buf, n) != n) { printf(1, "cat: write error\n"); exit(); } } if(n < 0){ printf(1, "cat: read error\n"); exit(); } } int main(int argc, char *argv[]) { int fd, i; if(argc <= 1){ cat(0); exit(); } for(i = 1; i < argc; i++){ if((fd = open(argv[i], 0)) < 0){ printf(1, "cat: cannot open %s\n", argv[i]); exit(); } cat(fd); close(fd); } exit(); }
Check result of write (thans to Alexander Kapshuk <alexander.kapshuk@gmail)
Check result of write (thans to Alexander Kapshuk <alexander.kapshuk@gmail)
C
mit
shyandsy/xv6,shyandsy/xv6,shyandsy/xv6,ManaPoustizadeh/OS-finalProject,shyandsy/xv6,ManaPoustizadeh/OS-finalProject,gw/xv6,phf/xv6-public,voytovichs/xv6-public,voytovichs/xv6-public,ManaPoustizadeh/OS-finalProject,voytovichs/xv6-public,gw/xv6,phf/xv6-public,voytovichs/xv6-public,voytovichs/xv6-public,phf/xv6-public,phf/xv6-public,ManaPoustizadeh/OS-finalProject,gw/xv6,gw/xv6,gw/xv6,shyandsy/xv6
84fa2ddd969525d8d92329bda9e9b9457ebc3ddd
mach.c
mach.c
#define WORD (8 * sizeof(ulong)) #define clz(x) __builtin_clzl(x) #define fls(x) (WORD - clz(x)) #define ffs(x) (__builtin_ctzl(x)) #define get(x, i) ((x) & (1 << (i))) #define set(x, i) (x = (x) | (1 << (i))) #define unset(x, i) (x = (x) & ~(1 << (i)))
#define WORD (8 * sizeof(ulong)) #define clz(x) __builtin_clzl(x) #define fls(x) (WORD - clz(x)) #define ffs(x) (__builtin_ctzl(x)) #define get(x, i) ((x) & (1L << (i))) #define set(x, i) (x = (x) | (1L << (i))) #define unset(x, i) (x = (x) & ~(1L << (i)))
Fix to literal data types in the macros
Fix to literal data types in the macros Thanks for Fu, Bing for noting.
C
mit
coriolanus/libhhash
8c6b30c2bdbdca9d78fcd7a4cde15e5aa6802029
safe.h
safe.h
#ifndef SAFE_H #define SAFE_H #include "debug.h" #ifndef DISABLE_SAFE #define SAFE_STRINGIFY(x) #x #define SAFE_TOSTRING(x) SAFE_STRINGIFY(x) #define SAFE_AT __FILE__ ":" SAFE_TOSTRING(__LINE__) ": " #define SAFE_ASSERT(cond) do { \ if (!(cond)) { \ DEBUG_DUMP(0, "error: " SAFE_AT "%m"); \ DEBUG_BREAK(!(cond)); \ } \ } while (0) #else #define SAFE_ASSERT(...) #endif #include <stdint.h> #define SAFE_NNCALL(call) do { \ intptr_t ret = (intptr_t) (call); \ SAFE_ASSERT(ret >= 0); \ } while (0) #define SAFE_NZCALL(call) do { \ intptr_t ret = (intptr_t) (call); \ SAFE_ASSERT(ret != 0); \ } while (0) #endif /* end of include guard: SAFE_H */
#ifndef SAFE_H #define SAFE_H #include "debug.h" #ifndef DISABLE_SAFE #define SAFE_STRINGIFY(x) #x #define SAFE_TOSTRING(x) SAFE_STRINGIFY(x) #define SAFE_AT __FILE__ ":" SAFE_TOSTRING(__LINE__) ": " #define SAFE_ASSERT(cond) do { \ if (!(cond)) { \ DEBUG_DUMP(0, "error: " SAFE_AT "%m"); \ DEBUG_BREAK(!(cond)); \ } \ } while (0) #else #define SAFE_ASSERT(...) #endif #include <stdint.h> #define SAFE_NNCALL(call) do { \ intptr_t ret = (intptr_t) (call); \ SAFE_ASSERT(ret >= 0); \ } while (0) #define SAFE_NZCALL(call) do { \ intptr_t ret = (intptr_t) (call); \ SAFE_ASSERT(ret != 0); \ } while (0) #define SAFE_RZCALL(call) do { \ intptr_t ret = (intptr_t) (call); \ SAFE_ASSERT(ret == 0); \ } while (0) #endif /* end of include guard: SAFE_H */
Add SAFE_RZCALL to wrap calls that returns zero.
Add SAFE_RZCALL to wrap calls that returns zero.
C
mit
chaoran/fibril,chaoran/fibril,chaoran/fibril
cccd3fafcffa318fa783f857f84b5545028daca2
src/pubkey/if_algo/if_op.h
src/pubkey/if_algo/if_op.h
/************************************************* * IF Operations Header File * * (C) 1999-2008 Jack Lloyd * *************************************************/ #ifndef BOTAN_IF_OP_H__ #define BOTAN_IF_OP_H__ #include <botan/bigint.h> #include <botan/pow_mod.h> #include <botan/reducer.h> namespace Botan { /************************************************* * IF Operation * *************************************************/ class BOTAN_DLL IF_Operation { public: virtual BigInt public_op(const BigInt&) const = 0; virtual BigInt private_op(const BigInt&) const = 0; virtual IF_Operation* clone() const = 0; virtual ~IF_Operation() {} }; /************************************************* * Default IF Operation * *************************************************/ class Default_IF_Op : public IF_Operation { public: BigInt public_op(const BigInt& i) const { return powermod_e_n(i); } BigInt private_op(const BigInt&) const; IF_Operation* clone() const { return new Default_IF_Op(*this); } Default_IF_Op(const BigInt&, const BigInt&, const BigInt&, const BigInt&, const BigInt&, const BigInt&, const BigInt&, const BigInt&); private: Fixed_Exponent_Power_Mod powermod_e_n, powermod_d1_p, powermod_d2_q; Modular_Reducer reducer; BigInt c, q; }; } #endif
/************************************************* * IF Operations Header File * * (C) 1999-2008 Jack Lloyd * *************************************************/ #ifndef BOTAN_IF_OP_H__ #define BOTAN_IF_OP_H__ #include <botan/bigint.h> #include <botan/pow_mod.h> #include <botan/reducer.h> namespace Botan { /************************************************* * IF Operation * *************************************************/ class BOTAN_DLL IF_Operation { public: virtual BigInt public_op(const BigInt&) const = 0; virtual BigInt private_op(const BigInt&) const = 0; virtual IF_Operation* clone() const = 0; virtual ~IF_Operation() {} }; /************************************************* * Default IF Operation * *************************************************/ class BOTAN_DLL Default_IF_Op : public IF_Operation { public: BigInt public_op(const BigInt& i) const { return powermod_e_n(i); } BigInt private_op(const BigInt&) const; IF_Operation* clone() const { return new Default_IF_Op(*this); } Default_IF_Op(const BigInt&, const BigInt&, const BigInt&, const BigInt&, const BigInt&, const BigInt&, const BigInt&, const BigInt&); private: Fixed_Exponent_Power_Mod powermod_e_n, powermod_d1_p, powermod_d2_q; Modular_Reducer reducer; BigInt c, q; }; } #endif
Add BOTAN_DLL macro to Default_IF_Op
Add BOTAN_DLL macro to Default_IF_Op
C
bsd-2-clause
randombit/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,webmaster128/botan
e2090ddb0dcd238d265538f9217f24b3780033e8
src/search/psdd/projection.h
src/search/psdd/projection.h
/* -*- mode:linux -*- */ /** * \file projection.h * * * * \author Ethan Burns * \date 2008-10-15 */ #if !defined(_PROJECTION_H_) #define _PROJECTION_H_ #include <vector> #include "../state.h" using namespace std; /** * An abstract projection function class. */ class Projection { public: virtual ~Projection(); /** * Project a state, returning an integer that represents the * NBlock that the state projects into. */ virtual unsigned int project(const State *s) = 0; /** * Get the number of NBlocks that will be used in this * projection. NBlocks will be numbered from 0..num_nblocks() */ virtual unsigned int get_num_nblocks(void) = 0; /** * Get the list of successor NBlock numbers. */ virtual vector<unsigned int>get_successors(const NBlock *b) = 0; /** * Get the list of predecessor NBlock numbers. */ virtual vector<unsigned int>get_predecessors(const NBlock *b) = 0; }; #endif /* !_PROJECTION_H_ */
/* -*- mode:linux -*- */ /** * \file projection.h * * * * \author Ethan Burns * \date 2008-10-15 */ #if !defined(_PROJECTION_H_) #define _PROJECTION_H_ #include <vector> #include "../state.h" using namespace std; /** * An abstract projection function class. */ class Projection { public: virtual ~Projection(); /** * Project a state, returning an integer that represents the * NBlock that the state projects into. */ virtual unsigned int project(const State *s) = 0; /** * Get the number of NBlocks that will be used in this * projection. NBlocks will be numbered from 0..num_nblocks() */ virtual unsigned int get_num_nblocks(void) = 0; /** * Get the list of successor NBlock numbers. */ virtual vector<unsigned int>get_successors(unsigned int b) = 0; /** * Get the list of predecessor NBlock numbers. */ virtual vector<unsigned int>get_predecessors(unsigned int b) = 0; }; #endif /* !_PROJECTION_H_ */
Remove the last reminints of NBlocks from Projection.
Remove the last reminints of NBlocks from Projection.
C
mit
eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf
cb32da0416b823b7f4b65e7e85d6cba16ca4d1e1
include/linux/slob_def.h
include/linux/slob_def.h
#ifndef __LINUX_SLOB_DEF_H #define __LINUX_SLOB_DEF_H void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); static inline void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) { return kmem_cache_alloc_node(cachep, flags, -1); } void *__kmalloc_node(size_t size, gfp_t flags, int node); static inline void *kmalloc_node(size_t size, gfp_t flags, int node) { return __kmalloc_node(size, flags, node); } /** * kmalloc - allocate memory * @size: how many bytes of memory are required. * @flags: the type of memory to allocate (see kcalloc). * * kmalloc is the normal method of allocating memory * in the kernel. */ static inline void *kmalloc(size_t size, gfp_t flags) { return __kmalloc_node(size, flags, -1); } static inline void *__kmalloc(size_t size, gfp_t flags) { return kmalloc(size, flags); } /** * kzalloc - allocate memory. The memory is set to zero. * @size: how many bytes of memory are required. * @flags: the type of memory to allocate (see kcalloc). */ static inline void *kzalloc(size_t size, gfp_t flags) { return __kzalloc(size, flags); } #endif /* __LINUX_SLOB_DEF_H */
#ifndef __LINUX_SLOB_DEF_H #define __LINUX_SLOB_DEF_H void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); static inline void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) { return kmem_cache_alloc_node(cachep, flags, -1); } void *__kmalloc_node(size_t size, gfp_t flags, int node); static inline void *kmalloc_node(size_t size, gfp_t flags, int node) { return __kmalloc_node(size, flags, node); } /** * kmalloc - allocate memory * @size: how many bytes of memory are required. * @flags: the type of memory to allocate (see kcalloc). * * kmalloc is the normal method of allocating memory * in the kernel. */ static inline void *kmalloc(size_t size, gfp_t flags) { return __kmalloc_node(size, flags, -1); } static inline void *__kmalloc(size_t size, gfp_t flags) { return kmalloc(size, flags); } #endif /* __LINUX_SLOB_DEF_H */
Kill off duplicate kzalloc() definition.
slob: Kill off duplicate kzalloc() definition. With the slab zeroing allocations cleanups Christoph stubbed in a generic kzalloc(), which was missed on SLOB. Follow the SLAB/SLUB changes and kill off the __kzalloc() wrapper that SLOB was using. Reported-by: Jan Engelhardt <f383ed465f890d2e8ea864dd0c28cf8ec50a8942@computergmbh.de> Signed-off-by: Paul Mundt <38b52dbb5f0b63d149982b6c5de788ec93a89032@linux-sh.org> Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
C
apache-2.0
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,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
b670133b9e9fd7bce078674d782dad9d7c320f9d
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); } void f6() { char *p; p = __builtin_alloca(10); p[1] = 'a'; }
Add a test case for alloca().
Add a test case for alloca(). git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59233 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
54993a9f4ebc279f5dac6754e61f2c6ea98dbb65
src/bin/test_carousel.c
src/bin/test_carousel.c
#include <Elementary.h> #ifdef HAVE_CONFIG_H # include "elementary_config.h" #endif #ifndef ELM_LIB_QUICKLAUNCH void test_carousel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Evas_Object *win, *bg; win = elm_win_add(NULL, "carousel", ELM_WIN_BASIC); elm_win_title_set(win, "Carousel"); elm_win_autodel_set(win, 1); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_show(bg); evas_object_resize(win, 320, 240); evas_object_show(win); } #endif
#include <Elementary.h> #ifdef HAVE_CONFIG_H # include "elementary_config.h" #endif #ifndef ELM_LIB_QUICKLAUNCH void test_carousel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Evas_Object *win, *bg, *car; win = elm_win_add(NULL, "carousel", ELM_WIN_BASIC); elm_win_title_set(win, "Carousel"); elm_win_autodel_set(win, 1); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_show(bg); car = elm_carousel_add(win); elm_win_resize_object_add(win, car); evas_object_size_hint_weight_set(car, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_carousel_item_add(car, NULL, "Item 1", NULL, NULL); elm_carousel_item_add(car, NULL, "Item 2", NULL, NULL); elm_carousel_item_add(car, NULL, "Tinga", NULL, NULL); elm_carousel_item_add(car, NULL, "Item 4", NULL, NULL); evas_object_show(car); evas_object_resize(win, 320, 240); evas_object_show(win); } #endif
Add carousel to carousel test =P
Add carousel to carousel test =P But it's not working anyway. SVN revision: 53684
C
lgpl-2.1
rvandegrift/elementary,rvandegrift/elementary,FlorentRevest/Elementary,rvandegrift/elementary,tasn/elementary,tasn/elementary,FlorentRevest/Elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary
8316f8d582c9a13bf1ebba93fe66d85a61430692
test/profile/infinite_loop.c
test/profile/infinite_loop.c
// RUN: %clang_pgogen -O2 -o %t %s // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t // RUN: llvm-profdata show -function main -counts %t.profraw| FileCheck %s void exit(int); int g; __attribute__((noinline)) void foo() { g++; if (g==1000) exit(0); } int main() { while (1) { foo(); } } // CHECK: Counters: // CHECK-NEXT: main: // CHECK-NEXT: Hash: {{.*}} // CHECK-NEXT: Counters: 1 // CHECK-NEXT: Block counts: [1000]
// RUN: %clang_pgogen -O2 -o %t %s // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t // RUN: llvm-profdata show -function main -counts %t.profraw| FileCheck %s void exit(int); int g; __attribute__((noinline)) void foo() { g++; if (g==1000) exit(0); } int main() { while (1) { foo(); } } // CHECK: Counters: // CHECK-NEXT: main: // CHECK-NEXT: Hash: {{.*}} // CHECK-NEXT: Counters: 2 // CHECK-NEXT: Block counts: [1000, 1]
Test case update for D40873
Test case update for D40873 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@320105 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
e1986201336c472fe94095486457c431f1e6bd9f
tests/end_to_end_tests_remote.h
tests/end_to_end_tests_remote.h
#ifndef end_to_end_tests_remote_h_incl #define end_to_end_tests_remote_h_incl #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include "end_to_end_tests_base.h" class EndToEndTestsRemote : public EndToEndTestsBase { static bool is_receiver; CPPUNIT_TEST_SUITE(EndToEndTestsRemote); CPPUNIT_TEST(testRandomBytesReceivedCorrectly); CPPUNIT_TEST(testDefaultIROBOrdering); CPPUNIT_TEST_SUITE_END(); protected: virtual void chooseRole(); virtual bool isReceiver(); void testDefaultIROBOrdering(); void testThunks(); }; #endif
#ifndef end_to_end_tests_remote_h_incl #define end_to_end_tests_remote_h_incl #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include "end_to_end_tests_base.h" class EndToEndTestsRemote : public EndToEndTestsBase { static bool is_receiver; CPPUNIT_TEST_SUITE(EndToEndTestsRemote); CPPUNIT_TEST(testRandomBytesReceivedCorrectly); CPPUNIT_TEST(testDefaultIROBOrdering); CPPUNIT_TEST(testThunks); CPPUNIT_TEST_SUITE_END(); protected: virtual void chooseRole(); virtual bool isReceiver(); void testDefaultIROBOrdering(); void testThunks(); }; #endif
Add the thunk test to the suite.
Add the thunk test to the suite. git-svn-id: 30f60abd488961f3df74c65f80d9d7b5813a1a78@653 1971e5c1-a347-0410-b49b-82492f0cf60c
C
bsd-2-clause
brettdh/libcmm,brettdh/libcmm,brettdh/libcmm,brettdh/libcmm,brettdh/libcmm
13f6248da3578c67dc472fb38e1abc621fc6f2ae
src/untrusted/nacl/pthread_initialize_minimal.c
src/untrusted/nacl/pthread_initialize_minimal.c
/* * Copyright (c) 2012 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 <unistd.h> #include "native_client/src/untrusted/nacl/nacl_irt.h" #include "native_client/src/untrusted/nacl/nacl_thread.h" #include "native_client/src/untrusted/nacl/tls.h" /* * This initialization happens early in startup with or without libpthread. * It must make it safe for vanilla newlib code to run. */ void __pthread_initialize_minimal(size_t tdb_size) { /* Adapt size for sbrk. */ /* TODO(robertm): this is somewhat arbitrary - re-examine). */ size_t combined_size = (__nacl_tls_combined_size(tdb_size) + 15) & ~15; /* * Use sbrk not malloc here since the library is not initialized yet. */ void *combined_area = sbrk(combined_size); /* * Fill in that memory with its initializer data. */ void *tp = __nacl_tls_initialize_memory(combined_area, tdb_size); /* * Set %gs, r9, or equivalent platform-specific mechanism. Requires * a syscall since certain bitfields of these registers are trusted. */ nacl_tls_init(tp); /* * Initialize newlib's thread-specific pointer. */ __newlib_thread_init(); }
/* * Copyright (c) 2012 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 <unistd.h> #include "native_client/src/untrusted/nacl/nacl_irt.h" #include "native_client/src/untrusted/nacl/nacl_thread.h" #include "native_client/src/untrusted/nacl/tls.h" /* * This initialization happens early in startup with or without libpthread. * It must make it safe for vanilla newlib code to run. */ void __pthread_initialize_minimal(size_t tdb_size) { size_t combined_size = __nacl_tls_combined_size(tdb_size); /* * Use sbrk not malloc here since the library is not initialized yet. */ void *combined_area = sbrk(combined_size); /* * Fill in that memory with its initializer data. */ void *tp = __nacl_tls_initialize_memory(combined_area, tdb_size); /* * Set %gs, r9, or equivalent platform-specific mechanism. Requires * a syscall since certain bitfields of these registers are trusted. */ nacl_tls_init(tp); /* * Initialize newlib's thread-specific pointer. */ __newlib_thread_init(); }
Remove unnecessary rounding when allocating initial thread block
Cleanup: Remove unnecessary rounding when allocating initial thread block The other calls to __nacl_tls_combined_size() don't do this. __nacl_tls_combined_size() should be doing any necessary rounding itself. BUG=none TEST=trybots Review URL: https://codereview.chromium.org/18555008 git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@11698 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
C
bsd-3-clause
Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client
715d1d7ea657172072bd95f436b7fc6290b97b92
KristalliProtocolModule/KristalliProtocolModuleApi.h
KristalliProtocolModule/KristalliProtocolModuleApi.h
// For conditions of distribution and use, see copyright notice in license.txt #ifndef incl_KristalliProtocolModuleApi_h #define incl_KristalliProtocolModuleApi_h #if defined (_WINDOWS) #if defined(KRISTALLIPROTOCOL_MODULE_EXPORTS) #define KRISTALLIPROTOCOL_MODULE_API __declspec(dllexport) #else #define KRISTALLIPROTOCOL_MODULE_API __declspec(dllimport) #endif #else #define KRISTALLIPROTOCOL #endif #endif
// For conditions of distribution and use, see copyright notice in license.txt #ifndef incl_KristalliProtocolModuleApi_h #define incl_KristalliProtocolModuleApi_h #if defined (_WINDOWS) #if defined(KRISTALLIPROTOCOL_MODULE_EXPORTS) #define KRISTALLIPROTOCOL_MODULE_API __declspec(dllexport) #else #define KRISTALLIPROTOCOL_MODULE_API __declspec(dllimport) #endif #else #define KRISTALLIPROTOCOL_MODULE_API #endif #endif
Fix syntax error for linux build.
Fix syntax error for linux build.
C
apache-2.0
realXtend/tundra,antont/tundra,antont/tundra,BogusCurry/tundra,antont/tundra,jesterKing/naali,BogusCurry/tundra,AlphaStaxLLC/tundra,pharos3d/tundra,AlphaStaxLLC/tundra,AlphaStaxLLC/tundra,antont/tundra,antont/tundra,realXtend/tundra,AlphaStaxLLC/tundra,pharos3d/tundra,antont/tundra,realXtend/tundra,AlphaStaxLLC/tundra,antont/tundra,jesterKing/naali,realXtend/tundra,BogusCurry/tundra,pharos3d/tundra,jesterKing/naali,realXtend/tundra,realXtend/tundra,pharos3d/tundra,BogusCurry/tundra,jesterKing/naali,BogusCurry/tundra,BogusCurry/tundra,jesterKing/naali,jesterKing/naali,AlphaStaxLLC/tundra,pharos3d/tundra,pharos3d/tundra,jesterKing/naali
695dbab30302266c3edf137895eb0627d7188d8d
chrome/browser/chromeos/cros/mock_update_library.h
chrome/browser/chromeos/cros/mock_update_library.h
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_ #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_ #pragma once #include "base/observer_list.h" #include "chrome/browser/chromeos/cros/update_library.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { class MockUpdateLibrary : public UpdateLibrary { public: MockUpdateLibrary() {} virtual ~MockUpdateLibrary() {} MOCK_METHOD1(AddObserver, void(Observer*)); // NOLINT MOCK_METHOD1(RemoveObserver, void(Observer*)); // NOLINT MOCK_METHOD0(CheckForUpdate, bool(void)); MOCK_METHOD0(RebootAfterUpdate, bool(void)); MOCK_METHOD1(SetReleaseTrack, bool(const std::string&)); MOCK_METHOD1(GetReleaseTrack, std::string()); MOCK_CONST_METHOD0(status, const Status&(void)); private: DISALLOW_COPY_AND_ASSIGN(MockUpdateLibrary); }; } // namespace chromeos #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_ #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_ #pragma once #include "base/observer_list.h" #include "chrome/browser/chromeos/cros/update_library.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { class MockUpdateLibrary : public UpdateLibrary { public: MockUpdateLibrary() {} virtual ~MockUpdateLibrary() {} MOCK_METHOD1(AddObserver, void(Observer*)); // NOLINT MOCK_METHOD1(RemoveObserver, void(Observer*)); // NOLINT MOCK_METHOD0(CheckForUpdate, bool(void)); MOCK_METHOD0(RebootAfterUpdate, bool(void)); MOCK_METHOD1(SetReleaseTrack, bool(const std::string&)); MOCK_METHOD0(GetReleaseTrack, std::string()); MOCK_CONST_METHOD0(status, const Status&(void)); private: DISALLOW_COPY_AND_ASSIGN(MockUpdateLibrary); }; } // namespace chromeos #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
Fix the Chrome OS build.
Fix the Chrome OS build. TEST=make -j40 BUILDTYPE=Release browser_tests BUG=chromium-os:6030 Review URL: http://codereview.chromium.org/4129006 git-svn-id: http://src.chromium.org/svn/trunk/src@64027 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 21f711df9e9164d849fc0c637465577383f0b1c0
C
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser
2f3b7e4c88b3634d077f158d8a90553981b8c0a7
include/pector/malloc_allocator_compat.h
include/pector/malloc_allocator_compat.h
#ifndef PECTOR_MALLOC_ALLOCATOR_COMPAT_H #define PECTOR_MALLOC_ALLOCATOR_COMPAT_H #ifdef __APPLE__ #include <malloc/malloc.h> #else #include <malloc.h> #endif #if defined __GNUC__ || defined _WIN32 || defined __APPLE__ || defined __FreeBSD__ #define PT_SIZE_AWARE_COMPAT #if defined _WIN32 #define PT_MALLOC_USABLE_SIZE(p) _msize(p) #elif defined __APPLE__ #define PT_MALLOC_USABLE_SIZE(p) malloc_size(p) #elif defined __GNUC__ || defined __FreeBSD__ #define PT_MALLOC_USABLE_SIZE(p) malloc_usable_size(p) #endif #endif // defined __GNUC__ || defined _WIN32 || defined __APPLE__ #endif
#ifndef PECTOR_MALLOC_ALLOCATOR_COMPAT_H #define PECTOR_MALLOC_ALLOCATOR_COMPAT_H #ifdef __APPLE__ #include <malloc/malloc.h> #else #include <malloc.h> #endif #if defined __linux__ || defined __gnu_hurd__ || defined _WIN32 || defined __APPLE__ || defined __FreeBSD__ #define PT_SIZE_AWARE_COMPAT #if defined _WIN32 #define PT_MALLOC_USABLE_SIZE(p) _msize(p) #elif defined __APPLE__ #define PT_MALLOC_USABLE_SIZE(p) malloc_size(p) #elif defined __gnu_hurd__ || __linux__ || defined __FreeBSD__ #define PT_MALLOC_USABLE_SIZE(p) malloc_usable_size(p) #endif #endif // defined __GNUC__ || defined _WIN32 || defined __APPLE__ #endif
Change malloc_usable_size for Linux with the __linux__ macro
Change malloc_usable_size for Linux with the __linux__ macro Suggested by Carter Li. Also add check for GNU/Hurd.
C
lgpl-2.1
pjump/pector,aguinet/pector,aguinet/pector,pjump/pector
c9454b616a60f0d476333b655458c81830562f9a
util.h
util.h
/* This file is part of ethash. ethash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ethash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ethash. If not, see <http://www.gnu.org/licenses/>. */ /** @file util.h * @author Tim Hughes <tim@twistedfury.com> * @date 2015 */ #pragma once #include <stdint.h> #include "compiler.h" #ifdef __cplusplus extern "C" { #endif //#ifdef _MSC_VER void debugf(char const* str, ...); //#else //#define debugf printf //#endif static inline uint32_t min_u32(uint32_t a, uint32_t b) { return a < b ? a : b; } static inline uint32_t clamp_u32(uint32_t x, uint32_t min_, uint32_t max_) { return x < min_ ? min_ : (x > max_ ? max_ : x); } #ifdef __cplusplus } #endif
/* This file is part of ethash. ethash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ethash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ethash. If not, see <http://www.gnu.org/licenses/>. */ /** @file util.h * @author Tim Hughes <tim@twistedfury.com> * @date 2015 */ #pragma once #include <stdint.h> #include "compiler.h" #ifdef __cplusplus extern "C" { #endif void debugf(char const* str, ...); static inline uint32_t min_u32(uint32_t a, uint32_t b) { return a < b ? a : b; } static inline uint32_t clamp_u32(uint32_t x, uint32_t min_, uint32_t max_) { return x < min_ ? min_ : (x > max_ ? max_ : x); } #ifdef __cplusplus } #endif
Add comment about stack probing and remove unused ifdefs
Add comment about stack probing and remove unused ifdefs
C
mit
PaulGrey30/go-get--u-github.com-tools-godep,LefterisJP/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,d-das/cpp-ethereum,joeldo/cpp-ethereum,xeddmc/cpp-ethereum,expanse-org/cpp-expanse,eco/cpp-ethereum,yann300/cpp-ethereum,gluk256/cpp-ethereum,expanse-project/cpp-expanse,karek314/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,expanse-project/cpp-expanse,xeddmc/cpp-ethereum,anthony-cros/cpp-ethereum,xeddmc/cpp-ethereum,xeddmc/cpp-ethereum,expanse-org/cpp-expanse,joeldo/cpp-ethereum,ethers/cpp-ethereum,smartbitcoin/cpp-ethereum,joeldo/cpp-ethereum,ethers/cpp-ethereum,vaporry/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,expanse-org/cpp-expanse,eco/cpp-ethereum,yann300/cpp-ethereum,programonauta/webthree-umbrella,d-das/cpp-ethereum,anthony-cros/cpp-ethereum,expanse-project/cpp-expanse,expanse-project/cpp-expanse,expanse-org/cpp-expanse,smartbitcoin/cpp-ethereum,LefterisJP/cpp-ethereum,expanse-project/cpp-expanse,LefterisJP/cpp-ethereum,ethers/cpp-ethereum,gluk256/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,expanse-org/cpp-expanse,d-das/cpp-ethereum,vaporry/cpp-ethereum,anthony-cros/cpp-ethereum,karek314/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,johnpeter66/ethminer,LefterisJP/webthree-umbrella,Sorceror32/go-get--u-github.com-tools-godep,PaulGrey30/go-get--u-github.com-tools-godep,eco/cpp-ethereum,d-das/cpp-ethereum,d-das/cpp-ethereum,smartbitcoin/cpp-ethereum,programonauta/webthree-umbrella,smartbitcoin/cpp-ethereum,yann300/cpp-ethereum,ethers/cpp-ethereum,eco/cpp-ethereum,karek314/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,expanse-project/cpp-expanse,karek314/cpp-ethereum,vaporry/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,johnpeter66/ethminer,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,joeldo/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,vaporry/webthree-umbrella,expanse-org/cpp-expanse,chfast/webthree-umbrella,joeldo/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,yann300/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,xeddmc/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,yann300/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,eco/cpp-ethereum,ethers/cpp-ethereum,smartbitcoin/cpp-ethereum,karek314/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,LefterisJP/webthree-umbrella,vaporry/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,arkpar/webthree-umbrella,anthony-cros/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,LefterisJP/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,vaporry/cpp-ethereum,anthony-cros/cpp-ethereum,gluk256/cpp-ethereum,xeddmc/cpp-ethereum,eco/cpp-ethereum,yann300/cpp-ethereum,johnpeter66/ethminer,smartbitcoin/cpp-ethereum,gluk256/cpp-ethereum,d-das/cpp-ethereum,LefterisJP/cpp-ethereum,ethers/cpp-ethereum,LefterisJP/cpp-ethereum,vaporry/cpp-ethereum,gluk256/cpp-ethereum,gluk256/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,karek314/cpp-ethereum,anthony-cros/cpp-ethereum,joeldo/cpp-ethereum
8377ed36990acb2eae2b1a4775f00688ab4490ea
tests/performance.c
tests/performance.c
int test_performance() { asic_t *device = asic_init(TI83p); struct timespec start, stop; unsigned long long t; int i; clock_gettime(CLOCK_MONOTONIC_RAW, &start); for (i = 0; i < 1000000; i++) { i -= cpu_execute(device->cpu, 1); } clock_gettime(CLOCK_MONOTONIC_RAW, &stop); t = (stop.tv_sec*1000000000UL) + stop.tv_nsec; t -= (start.tv_sec * 1000000000UL) + start.tv_nsec; printf("executed 1,000,000 cycles in %llu microseconds (~%llu MHz)\n", t/1000, 1000000000/t); asic_free(device); return -1; }
int test_performance() { asic_t *device = asic_init(TI83p); clock_t start, stop; int i; start = clock(); for (i = 0; i < 1000000; i++) { i -= cpu_execute(device->cpu, 1); } stop = clock(); double time = (double)(stop - start) / (CLOCKS_PER_SEC / 1000); double mHz = 1000.0 / time; printf("executed 1,000,000 cycles in %f milliseconds (~%f MHz)\n", time, mHz); asic_free(device); return -1; }
Switch to more common timing functions
Switch to more common timing functions
C
mit
KnightOS/z80e,KnightOS/z80e
8634605ecfa7cb7b339b066e57348ef7f4801e32
lib/CodeGen/SanitizerBlacklist.h
lib/CodeGen/SanitizerBlacklist.h
//===--- SanitizerBlacklist.h - Blacklist for sanitizers --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // User-provided blacklist used to disable/alter instrumentation done in // sanitizers. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_LIB_CODEGEN_SANITIZERBLACKLIST_H #define LLVM_CLANG_LIB_CODEGEN_SANITIZERBLACKLIST_H #include "clang/Basic/LLVM.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/SpecialCaseList.h" #include <memory> namespace llvm { class GlobalVariable; class Function; class Module; } namespace clang { namespace CodeGen { class SanitizerBlacklist { std::unique_ptr<llvm::SpecialCaseList> SCL; public: SanitizerBlacklist(llvm::SpecialCaseList *SCL) : SCL(SCL) {} bool isIn(const llvm::Module &M, StringRef Category = StringRef()) const; bool isIn(const llvm::Function &F) const; bool isIn(const llvm::GlobalVariable &G, StringRef Category = StringRef()) const; bool isBlacklistedType(StringRef MangledTypeName) const; }; } // end namespace CodeGen } // end namespace clang #endif
//===--- SanitizerBlacklist.h - Blacklist for sanitizers --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // User-provided blacklist used to disable/alter instrumentation done in // sanitizers. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_LIB_CODEGEN_SANITIZERBLACKLIST_H #define LLVM_CLANG_LIB_CODEGEN_SANITIZERBLACKLIST_H #include "clang/Basic/LLVM.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/SpecialCaseList.h" #include <memory> namespace llvm { class GlobalVariable; class Function; class Module; } namespace clang { namespace CodeGen { class SanitizerBlacklist { std::unique_ptr<llvm::SpecialCaseList> SCL; public: SanitizerBlacklist(std::unique_ptr<llvm::SpecialCaseList> SCL) : SCL(std::move(SCL)) {} bool isIn(const llvm::Module &M, StringRef Category = StringRef()) const; bool isIn(const llvm::Function &F) const; bool isIn(const llvm::GlobalVariable &G, StringRef Category = StringRef()) const; bool isBlacklistedType(StringRef MangledTypeName) const; }; } // end namespace CodeGen } // end namespace clang #endif
Fix for LLVM API change to SpecialCaseList::create
Fix for LLVM API change to SpecialCaseList::create git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@216926 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
8eb990df360a6eaac3a6bfe3bcb22636d99edc0b
gspell/gspell-init.h
gspell/gspell-init.h
/* * This file is part of gspell, a spell-checking library. * * Copyright 2016 - Ignacio Casal Quinteiro <icq@gnome.org> * Copyright 2016 - Sébastien Wilmet <swilmet@gnome.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef GSPELL_INIT_H #define GSPELL_INIT_H #include <glib.h> #ifdef G_OS_WIN32 #include <windef.h> G_GNUC_INTERNAL HMODULE _gspell_init_get_dll (void); #endif /* G_OS_WIN32 */ #endif /* GSPELL_INIT_H */ /* ex:set ts=8 noet: */
/* * This file is part of gspell, a spell-checking library. * * Copyright 2016 - Ignacio Casal Quinteiro <icq@gnome.org> * Copyright 2016 - Sébastien Wilmet <swilmet@gnome.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef GSPELL_INIT_H #define GSPELL_INIT_H #include <glib.h> #ifdef G_OS_WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> G_GNUC_INTERNAL HMODULE _gspell_init_get_dll (void); #endif /* G_OS_WIN32 */ #endif /* GSPELL_INIT_H */ /* ex:set ts=8 noet: */
Revert "win32: include windef.h instead of windows.h"
Revert "win32: include windef.h instead of windows.h" This reverts commit 7a51b17a061cb4e83c5d0e862cb1c4c32c7033e7. This was actually good, normally. See the discussion at: https://bugzilla.gnome.org/show_bug.cgi?id=774325 Not tested, I don't test gspell on/for Windows.
C
lgpl-2.1
GNOME/gspell,GNOME/gspell
0f993209fdd1e8bed4e9fd3d9ba758416b39eaa8
src/plugins/orbbec_hand/TrackedPoint.h
src/plugins/orbbec_hand/TrackedPoint.h
#ifndef TRACKEDPOINT_H #define TRACKEDPOINT_H #include <opencv2/core/affine.hpp> #include "TrackingData.h" namespace sensekit { namespace plugins { namespace hand { struct TrackedPoint { public: cv::Point m_position; cv::Point3f m_worldPosition; cv::Point3f m_steadyWorldPosition; cv::Point3f m_worldDeltaPosition; int m_trackingId; int m_inactiveFrameCount; float m_totalContributionArea; int m_wrongAreaCount; int m_activeFrameCount; TrackedPointType m_type; TrackingStatus m_status; TrackedPoint(cv::Point position, cv::Point3f worldPosition, int trackingId) { m_type = TrackedPointType::CandidatePoint; m_status = TrackingStatus::NotTracking; m_position = position; m_worldPosition = worldPosition; m_steadyWorldPosition = worldPosition; m_worldDeltaPosition = cv::Point3f(0, 0, 0); m_trackingId = trackingId; m_inactiveFrameCount = 0; m_activeFrameCount = 0; m_totalContributionArea = 0; m_wrongAreaCount = 0; } }; }}} #endif // TRACKEDPOINT_H
#ifndef TRACKEDPOINT_H #define TRACKEDPOINT_H #include <opencv2/core/affine.hpp> #include "TrackingData.h" namespace sensekit { namespace plugins { namespace hand { struct TrackedPoint { public: cv::Point m_position; cv::Point3f m_worldPosition; cv::Point3f m_worldDeltaPosition; cv::Point3f m_steadyWorldPosition; int m_trackingId; int m_inactiveFrameCount; int m_activeFrameCount; TrackedPointType m_type; TrackingStatus m_status; TrackedPoint(cv::Point position, cv::Point3f worldPosition, int trackingId) { m_type = TrackedPointType::CandidatePoint; m_status = TrackingStatus::NotTracking; m_position = position; m_worldPosition = worldPosition; m_steadyWorldPosition = worldPosition; m_worldDeltaPosition = cv::Point3f(0, 0, 0); m_trackingId = trackingId; m_inactiveFrameCount = 0; m_activeFrameCount = 0; } }; }}} #endif // TRACKEDPOINT_H
Remove old tracked point fields
Remove old tracked point fields
C
apache-2.0
orbbec/astra,orbbec/astra,orbbec/astra,orbbec/astra,orbbec/astra
2822ae02ece582706720ef387c37eee8c245a8f6
lib/c_impl/n_speech_trimmer.c
lib/c_impl/n_speech_trimmer.c
#include "noyes.h" #undef TRUE #define TRUE 1 #undef FALSE #define FALSE 0 SpeechTrimmer * new_speech_trimmer() { SpeechTrimmer *self = malloc(sizeof(SpeechTrimmer)); self->leader = 5; self->trailer = 5; self->speech_started = FALSE; self->bcm = new_bent_cent_marker(); self->false_count = 0; self->true_count = 0; self->queue = n_list_new(); self->eos_reached = FALSE; self->scs = 20; self->ecs = 50; } void free_speech_trimmer(SpeechTrimmer *self) { free(self); } void speech_trimmer_enqueue(SpeechTrimmer *self, NMatrix1* pcm) { } NMatrix1 * speech_trimmer_dequeue(SpeechTrimmer *self) { if (self->eos_reached || (self->speech_started && n_list_size(self->queue) > self->ecs)) { NMatrix1 * N = n_list_get(self->queue, 0); n_list_remove(self->queue, 0, 1); return N; } return NULL; } int speech_trimmer_eos(SpeechTrimmer *self) { return self->eos_reached; }
#include "noyes.h" #undef TRUE #define TRUE 1 #undef FALSE #define FALSE 0 SpeechTrimmer * new_speech_trimmer() { SpeechTrimmer *self = malloc(sizeof(SpeechTrimmer)); self->leader = 5; self->trailer = 5; self->speech_started = FALSE; self->bcm = new_bent_cent_marker(); self->false_count = 0; self->true_count = 0; self->queue = n_list_new(); self->eos_reached = FALSE; self->scs = 20; self->ecs = 50; return self; } void free_speech_trimmer(SpeechTrimmer *self) { free(self); } void speech_trimmer_enqueue(SpeechTrimmer *self, NMatrix1* pcm) { } NMatrix1 * speech_trimmer_dequeue(SpeechTrimmer *self) { if (self->eos_reached || (self->speech_started && n_list_size(self->queue) > self->ecs)) { NMatrix1 * N = n_list_get(self->queue, 0); n_list_remove(self->queue, 0, 1); return N; } return NULL; } int speech_trimmer_eos(SpeechTrimmer *self) { return self->eos_reached; }
Fix memory error due to missing return statement in speech trimmer constructor.
Fix memory error due to missing return statement in speech trimmer constructor.
C
bsd-2-clause
talkhouse/noyes,talkhouse/noyes,talkhouse/noyes
25c52209c37546ae811c6653fd725a192c58c602
components/password_manager/core/browser/browser_save_password_progress_logger.h
components/password_manager/core/browser/browser_save_password_progress_logger.h
// Copyright 2014 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_ #include <string> #include "components/autofill/core/common/save_password_progress_logger.h" class PasswordManagerClient; namespace password_manager { // This is the SavePasswordProgressLogger specialization for the browser code, // where the PasswordManagerClient can be directly called. class BrowserSavePasswordProgressLogger : public autofill::SavePasswordProgressLogger { public: explicit BrowserSavePasswordProgressLogger(PasswordManagerClient* client); virtual ~BrowserSavePasswordProgressLogger(); protected: // autofill::SavePasswordProgressLogger: virtual void SendLog(const std::string& log) OVERRIDE; private: // The PasswordManagerClient to which logs can be sent for display. The client // must outlive this logger. PasswordManagerClient* const client_; DISALLOW_COPY_AND_ASSIGN(BrowserSavePasswordProgressLogger); }; } // namespace password_manager #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
// Copyright 2014 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_ #include <string> #include "components/autofill/core/common/save_password_progress_logger.h" namespace password_manager { class PasswordManagerClient; // This is the SavePasswordProgressLogger specialization for the browser code, // where the PasswordManagerClient can be directly called. class BrowserSavePasswordProgressLogger : public autofill::SavePasswordProgressLogger { public: explicit BrowserSavePasswordProgressLogger(PasswordManagerClient* client); virtual ~BrowserSavePasswordProgressLogger(); protected: // autofill::SavePasswordProgressLogger: virtual void SendLog(const std::string& log) OVERRIDE; private: // The PasswordManagerClient to which logs can be sent for display. The client // must outlive this logger. PasswordManagerClient* const client_; DISALLOW_COPY_AND_ASSIGN(BrowserSavePasswordProgressLogger); }; } // namespace password_manager #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
Revert 262696 "Revert 262685 "Fix a forward declaration of Passw..."
Revert 262696 "Revert 262685 "Fix a forward declaration of Passw..." > Revert 262685 "Fix a forward declaration of PasswordManagerClient" > > Compile still fails: > http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20GTK%20Builder&number=2681 > ../../chrome/browser/ui/gtk/login_prompt_gtk.cc:70:7:error: 'PasswordManager' has not been declared > > > > Fix a forward declaration of PasswordManagerClient > > > > This went wrong with landing https://codereview.chromium.org/225093012 and https://codereview.chromium.org/216183008 too close from each other. > > > > BUG=347927,348523 > > R=blundell@chromium.org > > TBR=blundell@chromium.org > > > > Review URL: https://codereview.chromium.org/230883002 > > TBR=vabr@chromium.org > > Review URL: https://codereview.chromium.org/231043002 TBR=dmazzoni@google.com Review URL: https://codereview.chromium.org/231033004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@262700 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
dednal/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,jaruba/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,ltilve/chromium,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,littlstar/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,M4sse/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,ondra-novak/chromium.src,M4sse/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,ltilve/chromium,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,ondra-novak/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,M4sse/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,littlstar/chromium.src,dednal/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,jaruba/chromium.src,Chilledheart/chromium,dednal/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,dednal/chromium.src,littlstar/chromium.src,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,jaruba/chromium.src,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,littlstar/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,Chilledheart/chromium,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,ltilve/chromium,Jonekee/chromium.src,ltilve/chromium,Chilledheart/chromium,ltilve/chromium,Jonekee/chromium.src,Chilledheart/chromium,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,dednal/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src
404504635570833ffec7857cfa28e055b276b521
optional/capi/ext/proc_spec.c
optional/capi/ext/proc_spec.c
#include <string.h> #include "ruby.h" #include "rubyspec.h" #ifdef __cplusplus extern "C" { #endif #ifdef HAVE_RB_PROC_NEW VALUE concat_func(VALUE args) { int i; char buffer[500] = {0}; if (TYPE(args) != T_ARRAY) return Qnil; for(i = 0; i < RARRAY_LEN(args); ++i) { VALUE v = RARRAY_PTR(args)[i]; strcat(buffer, StringValuePtr(v)); strcat(buffer, "_"); } buffer[strlen(buffer) - 1] = 0; return rb_str_new2(buffer); } VALUE sp_underline_concat_proc(VALUE self) { return rb_proc_new(concat_func, Qnil); } #endif void Init_proc_spec() { VALUE cls; cls = rb_define_class("CApiProcSpecs", rb_cObject); #ifdef HAVE_RB_PROC_NEW rb_define_method(cls, "underline_concat_proc", sp_underline_concat_proc, 0); #endif } #ifdef __cplusplus } #endif
#include <string.h> #include "ruby.h" #include "rubyspec.h" #ifdef __cplusplus extern "C" { #endif #ifdef HAVE_RB_PROC_NEW VALUE concat_func(VALUE args) { int i; char buffer[500] = {0}; if (TYPE(val) != T_ARRAY) return Qnil; for(i = 0; i < RARRAY_LEN(args); ++i) { VALUE v = RARRAY_PTR(args)[i]; strcat(buffer, StringValuePtr(v)); strcat(buffer, "_"); } buffer[strlen(buffer) - 1] = 0; return rb_str_new2(buffer); } VALUE sp_underline_concat_proc(VALUE self) { return rb_proc_new(concat_func, Qnil); } #endif void Init_proc_spec() { VALUE cls; cls = rb_define_class("CApiProcSpecs", rb_cObject); #ifdef HAVE_RB_PROC_NEW rb_define_method(cls, "underline_concat_proc", sp_underline_concat_proc, 0); #endif } #ifdef __cplusplus } #endif
Revert "Fix typo in the commit a5312c77."
Revert "Fix typo in the commit a5312c77." This reverts commit 401825d6045ab8e3bd1514404e7c326a045a92ae. See the following revert for an explanation.
C
mit
godfat/rubyspec,chesterbr/rubyspec,kachick/rubyspec,iainbeeston/rubyspec,yous/rubyspec,sferik/rubyspec,flavio/rubyspec,markburns/rubyspec,scooter-dangle/rubyspec,benlovell/rubyspec,lucaspinto/rubyspec,ruby/rubyspec,Zoxc/rubyspec,metadave/rubyspec,saturnflyer/rubyspec,eregon/rubyspec,alex/rubyspec,Aesthetikx/rubyspec,JuanitoFatas/rubyspec,roshats/rubyspec,MagLev/rubyspec,freerange/rubyspec,no6v/rubyspec,xaviershay/rubyspec,chesterbr/rubyspec,terceiro/rubyspec,jannishuebl/rubyspec,lucaspinto/rubyspec,flavio/rubyspec,timfel/rubyspec,rdp/rubyspec,sgarciac/spec,josedonizetti/rubyspec,nevir/rubyspec,sferik/rubyspec,neomadara/rubyspec,marcandre/rubyspec,roshats/rubyspec,rkh/rubyspec,qmx/rubyspec,nevir/rubyspec,agrimm/rubyspec,DawidJanczak/rubyspec,Zoxc/rubyspec,tinco/rubyspec,benburkert/rubyspec,kidaa/rubyspec,wied03/rubyspec,saturnflyer/rubyspec,DawidJanczak/rubyspec,jstepien/rubyspec,terceiro/rubyspec,ruby/spec,wied03/rubyspec,bomatson/rubyspec,sgarciac/spec,eregon/rubyspec,MagLev/rubyspec,nobu/rubyspec,mrkn/rubyspec,griff/rubyspec,askl56/rubyspec,BanzaiMan/rubyspec,shirosaki/rubyspec,iliabylich/rubyspec,atambo/rubyspec,sgarciac/spec,yb66/rubyspec,mbj/rubyspec,DavidEGrayson/rubyspec,iliabylich/rubyspec,amarshall/rubyspec,bl4ckdu5t/rubyspec,JuanitoFatas/rubyspec,iainbeeston/rubyspec,neomadara/rubyspec,mrkn/rubyspec,ruby/spec,kidaa/rubyspec,ericmeyer/rubyspec,yaauie/rubyspec,alexch/rubyspec,DavidEGrayson/rubyspec,no6v/rubyspec,timfel/rubyspec,askl56/rubyspec,alindeman/rubyspec,julik/rubyspec,rdp/rubyspec,yb66/rubyspec,kachick/rubyspec,julik/rubyspec,ruby/rubyspec,xaviershay/rubyspec,jannishuebl/rubyspec,freerange/rubyspec,bomatson/rubyspec,marcandre/rubyspec,teleological/rubyspec,tinco/rubyspec,atambo/rubyspec,BanzaiMan/rubyspec,amarshall/rubyspec,benlovell/rubyspec,alexch/rubyspec,bjeanes/rubyspec,nobu/rubyspec,nobu/rubyspec,kachick/rubyspec,rkh/rubyspec,yaauie/rubyspec,griff/rubyspec,alindeman/rubyspec,jvshahid/rubyspec,oggy/rubyspec,ruby/spec,Aesthetikx/rubyspec,alex/rubyspec,jvshahid/rubyspec,josedonizetti/rubyspec,enricosada/rubyspec,godfat/rubyspec,wied03/rubyspec,benburkert/rubyspec,bjeanes/rubyspec,mbj/rubyspec,qmx/rubyspec,agrimm/rubyspec,markburns/rubyspec,scooter-dangle/rubyspec,ericmeyer/rubyspec,oggy/rubyspec,yous/rubyspec,bl4ckdu5t/rubyspec,shirosaki/rubyspec,metadave/rubyspec,eregon/rubyspec,jstepien/rubyspec,enricosada/rubyspec,teleological/rubyspec
8e4c186215c3d086a734dc0aec7f119b8a88c0a9
ui/views/widget/desktop_capture_client.h
ui/views/widget/desktop_capture_client.h
// Copyright (c) 2012 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_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_ #define UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "ui/aura/client/capture_client.h" #include "ui/views/views_export.h" namespace views { class VIEWS_EXPORT DesktopCaptureClient : public aura::client::CaptureClient { public: DesktopCaptureClient(); virtual ~DesktopCaptureClient(); private: // Overridden from aura::client::CaptureClient: virtual void SetCapture(aura::Window* window) OVERRIDE; virtual void ReleaseCapture(aura::Window* window) OVERRIDE; virtual aura::Window* GetCaptureWindow() OVERRIDE; aura::Window* capture_window_; DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient); }; } // namespace views #endif // UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
// Copyright (c) 2012 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_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_ #define UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "ui/aura/client/capture_client.h" namespace views { class DesktopCaptureClient : public aura::client::CaptureClient { public: DesktopCaptureClient(); virtual ~DesktopCaptureClient(); private: // Overridden from aura::client::CaptureClient: virtual void SetCapture(aura::Window* window) OVERRIDE; virtual void ReleaseCapture(aura::Window* window) OVERRIDE; virtual aura::Window* GetCaptureWindow() OVERRIDE; aura::Window* capture_window_; DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient); }; } // namespace views #endif // UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
Revert 155836 - Fix static build.
Revert 155836 - Fix static build. TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10918157 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@155841 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
anirudhSK/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,ltilve/chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,ltilve/chromium,littlstar/chromium.src,dushu1203/chromium.src,ondra-novak/chromium.src,Chilledheart/chromium,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,littlstar/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,ltilve/chromium,jaruba/chromium.src,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,hujiajie/pa-chromium,Just-D/chromium-1,anirudhSK/chromium,markYoungH/chromium.src,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,ltilve/chromium,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,patrickm/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,zcbenz/cefode-chromium,markYoungH/chromium.src,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,dednal/chromium.src,hgl888/chromium-crosswalk,Chilledheart/chromium,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,markYoungH/chromium.src,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,hujiajie/pa-chromium,patrickm/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,patrickm/chromium.src,anirudhSK/chromium,Jonekee/chromium.src,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,mogoweb/chromium-crosswalk,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,jaruba/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,dednal/chromium.src,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,dednal/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,ltilve/chromium,patrickm/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,markYoungH/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,nacl-webkit/chrome_deps,Jonekee/chromium.src,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,jaruba/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,M4sse/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,dednal/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,dushu1203/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,M4sse/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,M4sse/chromium.src,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,anirudhSK/chromium,zcbenz/cefode-chromium,ChromiumWebApps/chromium,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,axinging/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,patrickm/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,hujiajie/pa-chromium,ondra-novak/chromium.src,dushu1203/chromium.src
8c274b950988b1bb4e56ce734f4817dc4788ecaa
lib/tinynotify-cli.c
lib/tinynotify-cli.c
/* libtinynotify * (c) 2011 Michał Górny * 2-clause BSD-licensed */ #include "config.h" #include "tinynotify-cli.h" #include "tinynotify.h" #include <stdlib.h> #include <unistd.h> #include <getopt.h> Notification notification_new_from_cmdline(int argc, char *argv[]) { int opterr_backup = opterr; int arg; const char *icon = NOTIFICATION_DEFAULT_APP_ICON; const char *summary; const char *body = NOTIFICATION_NO_BODY; Notification n; opterr = 0; /* be quiet about nonsense args */ while (((arg = getopt(argc, argv, "i:"))) != -1) { switch (arg) { case 'i': icon = optarg; break; } } opterr = opterr_backup; if (optind >= argc) { /* XXX, better error handling? */ return NULL; } summary = argv[optind++]; if (optind < argc) body = argv[optind++]; n = notification_new(summary, body); notification_set_formatting(n, 0); if (icon) notification_set_app_icon(n, icon); return n; }
/* libtinynotify * (c) 2011 Michał Górny * 2-clause BSD-licensed */ #include "config.h" #include "tinynotify.h" #include "tinynotify-cli.h" #include <stdlib.h> #include <unistd.h> #include <getopt.h> Notification notification_new_from_cmdline(int argc, char *argv[]) { int opterr_backup = opterr; int arg; const char *icon = NOTIFICATION_DEFAULT_APP_ICON; const char *summary; const char *body = NOTIFICATION_NO_BODY; Notification n; opterr = 0; /* be quiet about nonsense args */ while (((arg = getopt(argc, argv, "i:"))) != -1) { switch (arg) { case 'i': icon = optarg; break; } } opterr = opterr_backup; if (optind >= argc) { /* XXX, better error handling? */ return NULL; } summary = argv[optind++]; if (optind < argc) body = argv[optind++]; n = notification_new(summary, body); notification_set_formatting(n, 0); if (icon) notification_set_app_icon(n, icon); return n; }
Switch header order to ensure local gets used before system one.
Switch header order to ensure local gets used before system one.
C
bsd-2-clause
mortbauer/tinynotify-send,mortbauer/libtinynotify
3c219200ac98dc367dcfbbf027efab4f3a3b1475
quic/platform/api/quic_test.h
quic/platform/api/quic_test.h
// Copyright (c) 2017 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 QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_ #define QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_ #include "quic/platform/api/quic_logging.h" #include "net/quic/platform/impl/quic_test_impl.h" using QuicFlagSaver = QuicFlagSaverImpl; // Defines the base classes to be used in QUIC tests. using QuicTest = QuicTestImpl; template <class T> using QuicTestWithParam = QuicTestWithParamImpl<T>; // Class which needs to be instantiated in tests which use threads. using ScopedEnvironmentForThreads = ScopedEnvironmentForThreadsImpl; #define QUIC_TEST_DISABLED_IN_CHROME(name) \ QUIC_TEST_DISABLED_IN_CHROME_IMPL(name) inline std::string QuicGetTestMemoryCachePath() { return QuicGetTestMemoryCachePathImpl(); } #define QUIC_SLOW_TEST(test) QUIC_SLOW_TEST_IMPL(test) #endif // QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
// Copyright (c) 2017 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 QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_ #define QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_ #include "quic/platform/api/quic_logging.h" #include "net/quic/platform/impl/quic_test_impl.h" #include "common/platform/api/quiche_test.h" using QuicFlagSaver = QuicFlagSaverImpl; // Defines the base classes to be used in QUIC tests. using QuicTest = QuicTestImpl; template <class T> using QuicTestWithParam = QuicTestWithParamImpl<T>; // Class which needs to be instantiated in tests which use threads. using ScopedEnvironmentForThreads = ScopedEnvironmentForThreadsImpl; #define QUIC_TEST_DISABLED_IN_CHROME(name) \ QUIC_TEST_DISABLED_IN_CHROME_IMPL(name) inline std::string QuicGetTestMemoryCachePath() { return QuicGetTestMemoryCachePathImpl(); } #define QUIC_SLOW_TEST(test) QUIC_SLOW_TEST_IMPL(test) #endif // QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
Move EXPECT_EQ macro magic from quic/platform to quiche/platform.
Move EXPECT_EQ macro magic from quic/platform to quiche/platform. The purpose of this machinary is to override EXPECT_EQ and similar comparison macros so that -Wsigned-compare actually catches signed-unsigned comparison in internal builds (where gTest implementation is slightly different so otherwise the warning would not be effective). This CL moves it from quic/platform/api/quic_test.h to quiche/common/platform/quiche_test.h, while also adding an include of the latter to the former, to make users of either header benefit from it. The change to frame_formatter_test.cc is necessary to avoid the following error: third_party/http2/tools/frame_formatter_test.cc:75:3: error: non-const lvalue reference to type 'basic_string<...>' cannot bind to a temporary of type 'basic_string<...>' EXPECT_EQ("\x01 a", std::move(status_or_parsed).value()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./third_party/quiche/common/platform/impl/quiche_test_impl.h:73:3: note: expanded from macro 'EXPECT_EQ' QUIC_LOGGING_INTERNAL_EXPECT_EXT(EqHelper::Compare, ==, val1, val2) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./third_party/quiche/common/platform/impl/quiche_test_impl.h:68:3: note: expanded from macro 'QUIC_LOGGING_INTERNAL_EXPECT_EXT' QUIC_LOGGING_INTERNAL_INNER_COMPARE(_comparison_symbol, _val1, _val2); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./net/quic/platform_overrides/quiche_platform_impl/quiche_logging_impl.h:164:30: note: expanded from macro 'QUIC_LOGGING_INTERNAL_INNER_COMPARE' const decltype(_val2)& _local_val2 = (_val2); \ PiperOrigin-RevId: 390165392
C
bsd-3-clause
google/quiche,google/quiche,google/quiche,google/quiche
ec11df6a1272f275bbda22375ee8a84c034e09b4
modules/modinclude.h
modules/modinclude.h
#include "../main.h" class ConfigReader; class ModuleInterface; // forward-declare so it can be used in modules and server #include "../connection.h" // declare other classes that use it #include "../modules.h" #include "../config.cpp" #include "../modinterface.cpp"
#include "../main.h" class ConfigReader; class ModuleInterface; // forward-declare so it can be used in modules and server #include "../connection.h" // declare other classes that use it #include "../modules.h" #include "../config.cpp" #include "../modules.cpp" #include "../modinterface.cpp"
Add a file to the module include.
Add a file to the module include.
C
mit
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
addd55dcf27bda9e3f6cfe4301c067276fa67161
plugins/ua_debug_dump_pkgs.c
plugins/ua_debug_dump_pkgs.c
/* This work is licensed under a Creative Commons CCZero 1.0 Universal License. * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */ #include "ua_util.h" #include <ctype.h> #include <stdio.h> void UA_dump_hex_pkg(UA_Byte* buffer, size_t bufferLen) { printf("--------------- HEX Package Start ---------------\n"); char ascii[17]; memset(ascii,0,17); for (size_t i = 0; i < bufferLen; i++) { if (i == 0) printf("%08zx ", i); else if (i%16 == 0) printf("|%s|\n%08zx ", ascii, i); if (isprint((int)(buffer[i]))) ascii[i%16] = (char)buffer[i]; else ascii[i%16] = '.'; printf("%02X ", (unsigned char)buffer[i]); } size_t fillPos = bufferLen %16; ascii[fillPos] = 0; for (size_t i=fillPos; i<16; i++) { printf(" "); } printf("|%s|\n%08zx\n", ascii, bufferLen); printf("--------------- HEX Package END ---------------\n"); }
/* This work is licensed under a Creative Commons CCZero 1.0 Universal License. * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */ #include "ua_util.h" #include <ctype.h> #include <stdio.h> void UA_dump_hex_pkg(UA_Byte* buffer, size_t bufferLen) { printf("--------------- HEX Package Start ---------------\n"); char ascii[17]; memset(ascii,0,17); for (size_t i = 0; i < bufferLen; i++) { if (i == 0) printf("%08zx ", i); else if (i%16 == 0) printf(" |%s|\n%08zx ", ascii, i); if (isprint((int)(buffer[i]))) ascii[i%16] = (char)buffer[i]; else ascii[i%16] = '.'; if (i%8==0) printf(" "); printf("%02X ", (unsigned char)buffer[i]); } size_t fillPos = bufferLen %16; ascii[fillPos] = 0; for (size_t i=fillPos; i<16; i++) { if (i%8==0) printf(" "); printf(" "); } printf(" |%s|\n%08zx\n", ascii, bufferLen); printf("--------------- HEX Package END ---------------\n"); }
Align format with `hexdump -C`
Align format with `hexdump -C`
C
mpl-2.0
JGrothoff/open62541,open62541/open62541,JGrothoff/open62541,JGrothoff/open62541,jpfr/open62541,jpfr/open62541,open62541/open62541,open62541/open62541,StalderT/open62541,jpfr/open62541,JGrothoff/open62541,StalderT/open62541,StalderT/open62541,StalderT/open62541,open62541/open62541,jpfr/open62541
f412fab9497a47ca77eece623fe53927302948c0
TWTValidation/TWTValidationLocalization.h
TWTValidation/TWTValidationLocalization.h
// // TWTValidationLocalization.h // TWTValidation // // Created by Prachi Gauriar on 4/3/2014. // Copyright (c) 2014 Two Toasters, LLC. All rights reserved. // #define TWTLocalizedString(key) \ [[NSBundle bundleForClass:[self class]] localizedStringForKey:(key) value:@"" table:@"TWTValidation"]
// // TWTValidationLocalization.h // TWTValidation // // Created by Prachi Gauriar on 4/3/2014. // Copyright (c) 2014 Two Toasters, LLC. // // 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. // #define TWTLocalizedString(key) \ [[NSBundle bundleForClass:[self class]] localizedStringForKey:(key) value:@"" table:@"TWTValidation"]
Add license to localization header
Add license to localization header
C
mit
twotoasters/TWTValidation,twotoasters/TWTValidation,twotoasters/TWTValidation
895dedeb2104e08ae4256d6f8f862798cb4d92f0
chrome/browser/ui/panels/panel_browser_window_gtk.h
chrome/browser/ui/panels/panel_browser_window_gtk.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 CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ #include "chrome/browser/ui/gtk/browser_window_gtk.h" class Panel; class PanelBrowserWindowGtk : public BrowserWindowGtk { public: PanelBrowserWindowGtk(Browser* browser, Panel* panel); virtual ~PanelBrowserWindowGtk() {} // BrowserWindowGtk overrides virtual void Init() OVERRIDE; // BrowserWindow overrides virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; protected: // BrowserWindowGtk overrides virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE; virtual bool HandleTitleBarLeftMousePress( GdkEventButton* event, guint32 last_click_time, gfx::Point last_click_position) OVERRIDE; virtual void SaveWindowPosition() OVERRIDE; virtual void SetGeometryHints() OVERRIDE; virtual bool UseCustomFrame() OVERRIDE; private: void SetBoundsImpl(); scoped_ptr<Panel> panel_; DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk); }; #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_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 CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ #include "chrome/browser/ui/gtk/browser_window_gtk.h" class Panel; class PanelBrowserWindowGtk : public BrowserWindowGtk { public: PanelBrowserWindowGtk(Browser* browser, Panel* panel); virtual ~PanelBrowserWindowGtk() {} // BrowserWindowGtk overrides virtual void Init() OVERRIDE; // BrowserWindow overrides virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; protected: // BrowserWindowGtk overrides virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE; virtual bool HandleTitleBarLeftMousePress( GdkEventButton* event, guint32 last_click_time, gfx::Point last_click_position) OVERRIDE; virtual void SaveWindowPosition() OVERRIDE; virtual void SetGeometryHints() OVERRIDE; virtual bool UseCustomFrame() OVERRIDE; private: void SetBoundsImpl(); Panel* panel_; DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk); }; #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
Revert 88154 - Use scoped_ptr for Panel in PanelBrowserWindowGTK. Reason: PanelBrowserWindow dtor is now complex and cannot be inlined.
Revert 88154 - Use scoped_ptr for Panel in PanelBrowserWindowGTK. Reason: PanelBrowserWindow dtor is now complex and cannot be inlined. BUG=None TEST=Verified WindowOpenPanel test now hits Panel destructor. Review URL: http://codereview.chromium.org/7120011 TBR=jennb@chromium.org Review URL: http://codereview.chromium.org/7003035 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@88159 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src,hujiajie/pa-chromium,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,keishi/chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,patrickm/chromium.src,dushu1203/chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,ondra-novak/chromium.src,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,robclark/chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,axinging/chromium-crosswalk,rogerwang/chromium,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,Jonekee/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,M4sse/chromium.src,robclark/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,robclark/chromium,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,ltilve/chromium,markYoungH/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,littlstar/chromium.src,jaruba/chromium.src,M4sse/chromium.src,anirudhSK/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,littlstar/chromium.src,keishi/chromium,robclark/chromium,chuan9/chromium-crosswalk,hujiajie/pa-chromium,anirudhSK/chromium,ChromiumWebApps/chromium,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,rogerwang/chromium,keishi/chromium,patrickm/chromium.src,ChromiumWebApps/chromium,anirudhSK/chromium,hgl888/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,ondra-novak/chromium.src,keishi/chromium,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium,Jonekee/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,Chilledheart/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,patrickm/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,robclark/chromium,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,jaruba/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,ondra-novak/chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,rogerwang/chromium,ltilve/chromium,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,dushu1203/chromium.src,Just-D/chromium-1,axinging/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,robclark/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,ltilve/chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,dednal/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dednal/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,nacl-webkit/chrome_deps,Chilledheart/chromium,keishi/chromium,dushu1203/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,dushu1203/chromium.src,rogerwang/chromium,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,rogerwang/chromium,patrickm/chromium.src,jaruba/chromium.src,robclark/chromium,junmin-zhu/chromium-rivertrail,rogerwang/chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,keishi/chromium,jaruba/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,junmin-zhu/chromium-rivertrail,dednal/chromium.src,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,dushu1203/chromium.src,M4sse/chromium.src,littlstar/chromium.src,jaruba/chromium.src,M4sse/chromium.src,keishi/chromium,fujunwei/chromium-crosswalk,ltilve/chromium,krieger-od/nwjs_chromium.src,Chilledheart/chromium,robclark/chromium,pozdnyakov/chromium-crosswalk,dednal/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,fujunwei/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,ltilve/chromium,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,anirudhSK/chromium,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,patrickm/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,rogerwang/chromium,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,ondra-novak/chromium.src,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,Chilledheart/chromium,Just-D/chromium-1,zcbenz/cefode-chromium,anirudhSK/chromium,Jonekee/chromium.src,Jonekee/chromium.src,robclark/chromium,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,dednal/chromium.src,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,anirudhSK/chromium,anirudhSK/chromium,Chilledheart/chromium,M4sse/chromium.src,robclark/chromium,TheTypoMaster/chromium-crosswalk,keishi/chromium,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,keishi/chromium,junmin-zhu/chromium-rivertrail,ltilve/chromium,keishi/chromium,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,Jonekee/chromium.src,ChromiumWebApps/chromium
b07ec29109a2ca1603d3a4c199132f4c510ef763
third_party/lua-5.2.3/src/floating_temple.c
third_party/lua-5.2.3/src/floating_temple.c
/* ** Hook functions for integration with the Floating Temple distributed ** interpreter */ #include <stddef.h> #define floating_temple_c #define LUA_CORE #include "lua.h" #include "floating_temple.h" #include "lobject.h" #include "luaconf.h" static int ft_defaultnewstringhook (lua_State *L, StkId obj, const char *str, size_t len) { return 0; } static int ft_defaultnewtablehook (lua_State *L, StkId obj, int b, int c) { return 0; } #define FT_DEFINE_HOOK_FUNC(install_func, hook_type, hook_var, \ default_hook_func) \ LUAI_DDEF hook_type hook_var = &default_hook_func; \ \ LUA_API hook_type install_func (hook_type hook) { \ hook_type old_hook = hook_var; \ hook_var = hook; \ return old_hook; \ } FT_DEFINE_HOOK_FUNC(ft_installnewstringhook, ft_NewStringHook, ft_newstringhook, ft_defaultnewstringhook) FT_DEFINE_HOOK_FUNC(ft_installnewtablehook, ft_NewTableHook, ft_newtablehook, ft_defaultnewtablehook) #undef FT_DEFINE_HOOK_FUNC
/* ** Hook functions for integration with the Floating Temple distributed ** interpreter */ #include <stddef.h> #define floating_temple_c #define LUA_CORE #include "lua.h" #include "floating_temple.h" #include "lobject.h" #include "luaconf.h" #define FT_DEFINE_HOOK_FUNC(install_func, hook_type, hook_var, hook_params, \ default_hook_func) \ static int default_hook_func hook_params { \ return 0; \ } \ \ LUAI_DDEF hook_type hook_var = &default_hook_func; \ \ LUA_API hook_type install_func (hook_type hook) { \ hook_type old_hook = hook_var; \ hook_var = hook; \ return old_hook; \ } FT_DEFINE_HOOK_FUNC(ft_installnewstringhook, ft_NewStringHook, ft_newstringhook, (lua_State *L, StkId obj, const char *str, size_t len), ft_defaultnewstringhook) FT_DEFINE_HOOK_FUNC(ft_installnewtablehook, ft_NewTableHook, ft_newtablehook, (lua_State *L, StkId obj, int b, int c), ft_defaultnewtablehook) #undef FT_DEFINE_HOOK_FUNC
Add the definition of the default hook function to the FT_DEFINE_HOOK_FUNCTION macro.
Add the definition of the default hook function to the FT_DEFINE_HOOK_FUNCTION macro.
C
apache-2.0
snyderek/floating_temple,snyderek/floating_temple,snyderek/floating_temple
72f86cdd70ccbe468222911d421f064981d34746
content/browser/renderer_host/quota_dispatcher_host.h
content/browser/renderer_host/quota_dispatcher_host.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 CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ #define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ #include "base/basictypes.h" #include "content/browser/browser_message_filter.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h" class GURL; class QuotaDispatcherHost : public BrowserMessageFilter { public: ~QuotaDispatcherHost(); bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok); private: void OnQueryStorageUsageAndQuota( int request_id, const GURL& origin_url, WebKit::WebStorageQuotaType type); void OnRequestStorageQuota( int request_id, const GURL& origin_url, WebKit::WebStorageQuotaType type, int64 requested_size); }; #endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_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 CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ #define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ #include "base/basictypes.h" #include "content/browser/browser_message_filter.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h" class GURL; class QuotaDispatcherHost : public BrowserMessageFilter { public: ~QuotaDispatcherHost(); virtual bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok); private: void OnQueryStorageUsageAndQuota( int request_id, const GURL& origin_url, WebKit::WebStorageQuotaType type); void OnRequestStorageQuota( int request_id, const GURL& origin_url, WebKit::WebStorageQuotaType type, int64 requested_size); }; #endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
Fix clang build that have been broken by 81364.
Fix clang build that have been broken by 81364. BUG=none TEST=green tree TBR=jam Review URL: http://codereview.chromium.org/6838008 git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@81368 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
C
bsd-3-clause
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
0dd1f0b32359949a948c557a2c20f5f735e00c3a
generic/include/clc/float/definitions.h
generic/include/clc/float/definitions.h
#define FLT_DIG 6 #define FLT_MANT_DIG 24 #define FLT_MAX_10_EXP +38 #define FLT_MAX_EXP +128 #define FLT_MIN_10_EXP -37 #define FLT_MIN_EXP -125 #define FLT_RADIX 2 #define FLT_MAX 0x1.fffffep127f #define FLT_MIN 0x1.0p-126f #define FLT_EPSILON 0x1.0p-23f #ifdef cl_khr_fp64 #define DBL_DIG 15 #define DBL_MANT_DIG 53 #define DBL_MAX_10_EXP +308 #define DBL_MAX_EXP +1024 #define DBL_MIN_10_EXP -307 #define DBL_MIN_EXP -1021 #define DBL_MAX 0x1.fffffffffffffp1023 #define DBL_MIN 0x1.0p-1022 #define DBL_EPSILON 0x1.0p-52 #endif
#define FLT_DIG 6 #define FLT_MANT_DIG 24 #define FLT_MAX_10_EXP +38 #define FLT_MAX_EXP +128 #define FLT_MIN_10_EXP -37 #define FLT_MIN_EXP -125 #define FLT_RADIX 2 #define FLT_MAX 0x1.fffffep127f #define FLT_MIN 0x1.0p-126f #define FLT_EPSILON 0x1.0p-23f #define M_PI_F 0x1.921fb6p+1 #ifdef cl_khr_fp64 #define DBL_DIG 15 #define DBL_MANT_DIG 53 #define DBL_MAX_10_EXP +308 #define DBL_MAX_EXP +1024 #define DBL_MIN_10_EXP -307 #define DBL_MIN_EXP -1021 #define DBL_MAX 0x1.fffffffffffffp1023 #define DBL_MIN 0x1.0p-1022 #define DBL_EPSILON 0x1.0p-52 #endif
Add definition for M_PI_F v3
Add definition for M_PI_F v3 v2: - Use a hexadecimal constant. v3: - Use a hexadecimal constant in floating-point notation. git-svn-id: e7f1ab7c2a259259587475a3e7520e757882f167@204666 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc
f90fc43d4d7518e454793a5bb6b6a882e7e01d9a
test/Driver/offloading-interoperability.c
test/Driver/offloading-interoperability.c
// REQUIRES: clang-driver // REQUIRES: powerpc-registered-target // REQUIRES: nvptx-registered-target // // Verify that CUDA device commands do not get OpenMP flags. // // RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp %s 2>&1 \ // RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE // // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
// REQUIRES: clang-driver // REQUIRES: powerpc-registered-target // REQUIRES: nvptx-registered-target // // Verify that CUDA device commands do not get OpenMP flags. // // RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \ // RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE // // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
Make test not fail on hosts where the default omp library is gomp.
Make test not fail on hosts where the default omp library is gomp. This is the case on some linuxes, just force libomp so we get the desired results. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@277138 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
21a1e7a69685d0698eac0cfee6435035e02363d9
base/checks.h
base/checks.h
/* * Copyright 2006 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ // This module contains some basic debugging facilities. // Originally comes from shared/commandlineflags/checks.h #ifndef WEBRTC_BASE_CHECKS_H_ #define WEBRTC_BASE_CHECKS_H_ namespace rtc { // Prints an error message to stderr and aborts execution. void Fatal(const char* file, int line, const char* format, ...); } // namespace rtc // The UNREACHABLE macro is very useful during development. #define UNREACHABLE() \ rtc::Fatal(__FILE__, __LINE__, "unreachable code") #endif // WEBRTC_BASE_CHECKS_H_
/* * Copyright 2006 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ // This module contains some basic debugging facilities. // Originally comes from shared/commandlineflags/checks.h #ifndef WEBRTC_BASE_CHECKS_H_ #define WEBRTC_BASE_CHECKS_H_ namespace rtc { // Prints an error message to stderr and aborts execution. void Fatal(const char* file, int line, const char* format, ...); } // namespace rtc // Trigger a fatal error (which aborts the process and prints an error // message). FATAL_ERROR_IF may seem a lot like assert, but there's a crucial // difference: it's always "on". This means that it can be used to check for // regular errors that could actually happen, not just programming errors that // supposedly can't happen---but triggering a fatal error will kill the process // in an ugly way, so it's not suitable for catching errors that might happen // in production. #define FATAL_ERROR(msg) do { rtc::Fatal(__FILE__, __LINE__, msg); } while (0) #define FATAL_ERROR_IF(x) do { if (x) FATAL_ERROR("check failed"); } while (0) // The UNREACHABLE macro is very useful during development. #define UNREACHABLE() FATAL_ERROR("unreachable code") #endif // WEBRTC_BASE_CHECKS_H_
Define convenient FATAL_ERROR() and FATAL_ERROR_IF() macros
Define convenient FATAL_ERROR() and FATAL_ERROR_IF() macros R=henrike@webrtc.org Review URL: https://webrtc-codereview.appspot.com/16079004 git-svn-id: 03ae4fbe531b1eefc9d815f31e49022782c42458@6701 4adac7df-926f-26a2-2b94-8c16560cd09d
C
bsd-3-clause
Omegaphora/external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,Omegaphora/external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,Omegaphora/external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,Omegaphora/external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,Omegaphora/external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc
9bae8c664000ff38f07429fa1726ec61575f2c84
tests/regression/13-privatized/17-priv_interval.c
tests/regression/13-privatized/17-priv_interval.c
// PARAM: --set ana.int.interval true --set solver "'new'" #include<pthread.h> #include<assert.h> int glob1 = 5; pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { int t; pthread_mutex_lock(&mutex1); t = glob1; assert(t == 5); glob1 = -10; assert(glob1 == -10); glob1 = t; pthread_mutex_unlock(&mutex1); return NULL; } int main(void) { pthread_t id; assert(glob1 == 5); pthread_create(&id, NULL, t_fun, NULL); pthread_mutex_lock(&mutex1); glob1++; assert(glob1 == 6); glob1--; pthread_mutex_unlock(&mutex1); pthread_join (id, NULL); return 0; }
// PARAM: --set ana.int.interval true --set solver "'td3'" #include<pthread.h> #include<assert.h> int glob1 = 5; pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { int t; pthread_mutex_lock(&mutex1); t = glob1; assert(t == 5); glob1 = -10; assert(glob1 == -10); glob1 = t; pthread_mutex_unlock(&mutex1); return NULL; } int main(void) { pthread_t id; assert(glob1 == 5); pthread_create(&id, NULL, t_fun, NULL); pthread_mutex_lock(&mutex1); glob1++; assert(glob1 == 6); glob1--; pthread_mutex_unlock(&mutex1); pthread_join (id, NULL); return 0; }
Switch solver for 13-privatized/17-priv_internal.c to td3 to make test case pass
Switch solver for 13-privatized/17-priv_internal.c to td3 to make test case pass
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
50c714cde2c67b4c326cbec21d9383620ffbd32d
tensorflow/core/platform/default/integral_types.h
tensorflow/core/platform/default/integral_types.h
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ #define TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ // IWYU pragma: private, include "third_party/tensorflow/core/platform/types.h" // IWYU pragma: friend third_party/tensorflow/core/platform/types.h namespace tensorflow { typedef signed char int8; typedef short int16; typedef int int32; typedef long long int64; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned long long uint64; } // namespace tensorflow #endif // TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ #define TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_ #include <cstdint> // IWYU pragma: private, include "third_party/tensorflow/core/platform/types.h" // IWYU pragma: friend third_party/tensorflow/core/platform/types.h namespace tensorflow { typedef signed char int8; typedef short int16; typedef int int32; typedef std::int64_t int64; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef std::uint64_t uint64; } // namespace tensorflow #endif // TENSORFLOW_CORE_PLATFORM_DEFAULT_INTEGRAL_TYPES_H_
Change definition of tensorflow::int64 to std::int64_t.
Change definition of tensorflow::int64 to std::int64_t. There is no reason for TensorFlow to have its own special non-standard `int64` type any more; we can use the standard one instead. PiperOrigin-RevId: 351674712 Change-Id: I82c1d67c07436a3f158a029a3a657fef5a05060e
C
apache-2.0
karllessard/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,sarvex/tensorflow,yongtang/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,tensorflow/tensorflow,annarev/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,yongtang/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-Corporation/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,annarev/tensorflow,petewarden/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,annarev/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,sarvex/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,annarev/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,tensorflow/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,petewarden/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,sarvex/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow
bc97f851842b313acf04e099fc95f94676a05894
TRVSDictionaryWithCaseInsensitivity/TRVSDictionaryWithCaseInsensitivity.h
TRVSDictionaryWithCaseInsensitivity/TRVSDictionaryWithCaseInsensitivity.h
// // TRVSDictionaryWithCaseInsensitivity.h // TRVSDictionaryWithCaseInsensitivity // // Created by Travis Jeffery on 7/24/14. // Copyright (c) 2014 Travis Jeffery. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for TRVSDictionaryWithCaseInsensitivity. FOUNDATION_EXPORT double TRVSDictionaryWithCaseInsensitivityVersionNumber; //! Project version string for TRVSDictionaryWithCaseInsensitivity. FOUNDATION_EXPORT const unsigned char TRVSDictionaryWithCaseInsensitivityVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <TRVSDictionaryWithCaseInsensitivity/PublicHeader.h> @interface TRVSDictionaryWithCaseInsensitivity : NSDictionary @end
// // TRVSDictionaryWithCaseInsensitivity.h // TRVSDictionaryWithCaseInsensitivity // // Created by Travis Jeffery on 7/24/14. // Copyright (c) 2014 Travis Jeffery. All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for TRVSDictionaryWithCaseInsensitivity. FOUNDATION_EXPORT double TRVSDictionaryWithCaseInsensitivityVersionNumber; //! Project version string for TRVSDictionaryWithCaseInsensitivity. FOUNDATION_EXPORT const unsigned char TRVSDictionaryWithCaseInsensitivityVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <TRVSDictionaryWithCaseInsensitivity/PublicHeader.h> @interface TRVSDictionaryWithCaseInsensitivity : NSDictionary @end
Fix import of foundation - no need for uikit
Fix import of foundation - no need for uikit
C
mit
travisjeffery/TRVSDictionaryWithCaseInsensitivity
7f2565af8a98c0dc8f3c0bcd3f92098e669208f1
SmartDeviceLink/SDLImageField+ScreenManagerExtensions.h
SmartDeviceLink/SDLImageField+ScreenManagerExtensions.h
// // SDLImageField+ScreenManagerExtensions.h // SmartDeviceLink // // Created by Joel Fischer on 5/20/20. // Copyright © 2020 smartdevicelink. All rights reserved. // #import <SmartDeviceLink/SmartDeviceLink.h> NS_ASSUME_NONNULL_BEGIN @interface SDLImageField (ScreenManagerExtensions) + (NSArray<SDLImageField *> *)allImageFields; @end NS_ASSUME_NONNULL_END
// // SDLImageField+ScreenManagerExtensions.h // SmartDeviceLink // // Created by Joel Fischer on 5/20/20. // Copyright © 2020 smartdevicelink. All rights reserved. // #import "SDLImageField.h" NS_ASSUME_NONNULL_BEGIN @interface SDLImageField (ScreenManagerExtensions) + (NSArray<SDLImageField *> *)allImageFields; @end NS_ASSUME_NONNULL_END
Fix failed import in podspec
Fix failed import in podspec
C
bsd-3-clause
smartdevicelink/sdl_ios,smartdevicelink/sdl_ios,smartdevicelink/sdl_ios,smartdevicelink/sdl_ios,smartdevicelink/sdl_ios
6a70d7a87c3b684caf67cbccb56753db807fb005
ext/cap2/cap2.c
ext/cap2/cap2.c
#include <ruby.h> #include <errno.h> #include <sys/capability.h> static VALUE cap2_getpcaps(VALUE self, VALUE pid) { cap_t cap_d; ssize_t length; char *caps; VALUE result; Check_Type(pid, T_FIXNUM); cap_d = cap_get_pid(NUM2INT(pid)); if (cap_d == NULL) { rb_raise( rb_eRuntimeError, "Failed to get cap's for proccess %d: (%s)\n", NUM2INT(pid), strerror(errno) ); } else { caps = cap_to_text(cap_d, &length); result = rb_str_new(caps, length); cap_free(caps); cap_free(cap_d); } return result; } void Init_cap2(void) { VALUE rb_mCap2; rb_mCap2 = rb_define_module("Cap2"); rb_define_module_function(rb_mCap2, "getpcaps", cap2_getpcaps, 1); }
#include <ruby.h> #include <errno.h> #include <sys/capability.h> static VALUE cap2_getpcaps(VALUE self, VALUE pid) { cap_t cap_d; ssize_t length; char *caps; VALUE result; Check_Type(pid, T_FIXNUM); cap_d = cap_get_pid(FIX2INT(pid)); if (cap_d == NULL) { rb_raise( rb_eRuntimeError, "Failed to get cap's for proccess %d: (%s)\n", FIX2INT(pid), strerror(errno) ); } else { caps = cap_to_text(cap_d, &length); result = rb_str_new(caps, length); cap_free(caps); cap_free(cap_d); } return result; } void Init_cap2(void) { VALUE rb_mCap2; rb_mCap2 = rb_define_module("Cap2"); rb_define_module_function(rb_mCap2, "getpcaps", cap2_getpcaps, 1); }
Use FIX2INT rather than NUM2INT in Cap2.getpcaps
Use FIX2INT rather than NUM2INT in Cap2.getpcaps
C
mit
lmars/cap2,lmars/cap2
6e2bee2717a640046dd323972d9c7238d8184797
include/ccspec/core/example_group.h
include/ccspec/core/example_group.h
#ifndef CCSPEC_CORE_EXAMPLE_GROUP_H_ #define CCSPEC_CORE_EXAMPLE_GROUP_H_ #include <functional> #include <list> #include <stack> #include <string> namespace ccspec { namespace core { class ExampleGroup; typedef ExampleGroup* Creator(std::string desc, std::function<void ()> spec); class ExampleGroup { public: virtual ~ExampleGroup(); void addChild(ExampleGroup*); protected: ExampleGroup(std::string desc); private: std::string desc_; std::list<ExampleGroup*> children_; friend Creator describe; friend Creator context; }; extern std::stack<ExampleGroup*> groups_being_defined; Creator describe; Creator context; } // namespace core } // namespace ccspec #endif // CCSPEC_CORE_EXAMPLE_GROUP_H_
#ifndef CCSPEC_CORE_EXAMPLE_GROUP_H_ #define CCSPEC_CORE_EXAMPLE_GROUP_H_ #include <functional> #include <list> #include <stack> #include <string> namespace ccspec { namespace core { class ExampleGroup; typedef ExampleGroup* Creator(std::string desc, std::function<void ()> spec); extern std::stack<ExampleGroup*> groups_being_defined; class ExampleGroup { public: virtual ~ExampleGroup(); void addChild(ExampleGroup*); protected: ExampleGroup(std::string desc); private: std::string desc_; std::list<ExampleGroup*> children_; friend Creator describe; friend Creator context; }; Creator describe; Creator context; } // namespace core } // namespace ccspec #endif // CCSPEC_CORE_EXAMPLE_GROUP_H_
Move global variable declaration for consistency
Move global variable declaration for consistency
C
mit
zhangsu/ccspec,tempbottle/ccspec,michaelachrisco/ccspec,zhangsu/ccspec,michaelachrisco/ccspec,tempbottle/ccspec,michaelachrisco/ccspec,tempbottle/ccspec,zhangsu/ccspec
a6c7d872c26713d43f0152ce23abf4c6eccfc609
grantlee_core_library/filterexpression.h
grantlee_core_library/filterexpression.h
/* Copyright (c) 2009 Stephen Kelly <steveire@gmail.com> */ #ifndef FILTER_H #define FILTER_H #include "variable.h" #include "grantlee_export.h" namespace Grantlee { class Parser; } class Token; namespace Grantlee { class GRANTLEE_EXPORT FilterExpression { public: enum Reversed { IsNotReversed, IsReversed }; FilterExpression(); FilterExpression(const QString &varString, Grantlee::Parser *parser = 0); int error(); // QList<QPair<QString, QString> > filters(); Variable variable(); QVariant resolve(Context *c); bool isTrue(Context *c); QVariantList toList(Context *c); private: Variable m_variable; int m_error; }; } #endif
/* Copyright (c) 2009 Stephen Kelly <steveire@gmail.com> */ #ifndef FILTEREXPRESSION_H #define FILTEREXPRESSION_H #include "variable.h" #include "grantlee_export.h" namespace Grantlee { class Parser; } class Token; namespace Grantlee { class GRANTLEE_EXPORT FilterExpression { public: enum Reversed { IsNotReversed, IsReversed }; FilterExpression(); FilterExpression(const QString &varString, Grantlee::Parser *parser = 0); int error(); // QList<QPair<QString, QString> > filters(); Variable variable(); QVariant resolve(Context *c); bool isTrue(Context *c); QVariantList toList(Context *c); private: Variable m_variable; int m_error; }; } #endif
Use a correct include guard
Use a correct include guard
C
lgpl-2.1
simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee
baa17436b073514a3739fad3b487c0bee90afb5d
include/corsika/particle/VParticleProperties.h
include/corsika/particle/VParticleProperties.h
/** \file Particle property interface \author Lukas Nellen \version $Id$ \date 03 Apr 2004 */ #pragma once #include <string> namespace corsika { /** \class VParticleProperties VParticleProperties.h "corsika/VParticleProperties.h" \brief Internal interface for particle properties. This is intended to be implemented for elementary particles and nuclei. \note This is an internal interface and not available for user code. \author Lukas Nellen \date 03 Apr 2004 \ingroup particles */ class VParticleProperties { public: virtual ~VParticleProperties() { } /// Get particle type (using PDG particle codes) virtual int GetType() const = 0; /// Get particle name virtual std::string GetName() const = 0; /// Get particle mass (in Auger units) virtual double GetMass() const = 0; }; typedef std::shared_ptr<const VParticleProperties> ParticlePropertiesPtr; }
/** \file Particle property interface \author Lukas Nellen \version $Id$ \date 03 Apr 2004 */ #pragma once #include <string> #include <memory.h> namespace corsika { /** \class VParticleProperties VParticleProperties.h "corsika/VParticleProperties.h" \brief Internal interface for particle properties. This is intended to be implemented for elementary particles and nuclei. \note This is an internal interface and not available for user code. \author Lukas Nellen \date 03 Apr 2004 \ingroup particles */ class VParticleProperties { public: virtual ~VParticleProperties() { } /// Get particle type (using PDG particle codes) virtual int GetType() const = 0; /// Get particle name virtual std::string GetName() const = 0; /// Get particle mass (in Auger units) virtual double GetMass() const = 0; }; typedef std::shared_ptr<const VParticleProperties> ParticlePropertiesPtr; }
Add one more memory include
Add one more memory include
C
bsd-2-clause
javierggt/corsika_reader,javierggt/corsika_reader,javierggt/corsika_reader
e1c47c5248d8c0d0bbb2462b73cd7ee031ef85d3
src/engine/core/include/halley/core/entry/entry_point.h
src/engine/core/include/halley/core/entry/entry_point.h
#pragma once #include <memory> #include <vector> #include "halley/core/game/main_loop.h" #ifdef _WIN32 #define HALLEY_STDCALL __stdcall #else #define HALLEY_STDCALL #endif namespace Halley { class Game; class Core; class HalleyStatics; constexpr static uint32_t HALLEY_DLL_API_VERSION = 23; class IHalleyEntryPoint { public: virtual ~IHalleyEntryPoint() = default; void initSharedStatics(const HalleyStatics& parent); virtual uint32_t getApiVersion() { return HALLEY_DLL_API_VERSION; } virtual std::unique_ptr<Core> createCore(const std::vector<std::string>& args) = 0; virtual std::unique_ptr<Game> createGame() = 0; }; template <typename GameType> class HalleyEntryPoint final : public IHalleyEntryPoint { public: std::unique_ptr<Game> createGame() override { return std::make_unique<GameType>(); } std::unique_ptr<Core> createCore(const std::vector<std::string>& args) override { Expects(args.size() >= 1); Expects(args.size() < 1000); return std::make_unique<Core>(std::make_unique<GameType>(), args); } }; }
#pragma once #include <memory> #include <vector> #include "halley/core/game/main_loop.h" #ifdef _WIN32 #define HALLEY_STDCALL __stdcall #else #define HALLEY_STDCALL #endif namespace Halley { class Game; class Core; class HalleyStatics; constexpr static uint32_t HALLEY_DLL_API_VERSION = 24; class IHalleyEntryPoint { public: virtual ~IHalleyEntryPoint() = default; virtual uint32_t getApiVersion() { return HALLEY_DLL_API_VERSION; } virtual std::unique_ptr<Core> createCore(const std::vector<std::string>& args) = 0; virtual std::unique_ptr<Game> createGame() = 0; void initSharedStatics(const HalleyStatics& parent); }; template <typename GameType> class HalleyEntryPoint final : public IHalleyEntryPoint { public: std::unique_ptr<Game> createGame() override { return std::make_unique<GameType>(); } std::unique_ptr<Core> createCore(const std::vector<std::string>& args) override { Expects(args.size() >= 1); Expects(args.size() < 1000); return std::make_unique<Core>(std::make_unique<GameType>(), args); } }; }
Move new method on interface further down to avoid messing with vtable compatibility
Move new method on interface further down to avoid messing with vtable compatibility
C
apache-2.0
amzeratul/halley,amzeratul/halley,amzeratul/halley
4771a29b5042fc9496f4d72f76c0151fe73716ba
src/placement/apollonius_labels_arranger.h
src/placement/apollonius_labels_arranger.h
#ifndef SRC_PLACEMENT_APOLLONIUS_LABELS_ARRANGER_H_ #define SRC_PLACEMENT_APOLLONIUS_LABELS_ARRANGER_H_ #include <Eigen/Core> #include <memory> #include <vector> #include "./labels_arranger.h" class CudaArrayProvider; namespace Placement { /** * \brief Returns the labels in an order defined by the apollonius graph * */ class ApolloniusLabelsArranger : public LabelsArranger { public: ApolloniusLabelsArranger() = default; virtual ~ApolloniusLabelsArranger(); void initialize(std::shared_ptr<CudaArrayProvider> distanceTransformTextureMapper, std::shared_ptr<CudaArrayProvider> apolloniusTextureMapper); virtual std::vector<Label> getArrangement(const LabellerFrameData &frameData, std::shared_ptr<LabelsContainer> labels); private: std::shared_ptr<CudaArrayProvider> distanceTransformTextureMapper; std::shared_ptr<CudaArrayProvider> apolloniusTextureMapper; std::vector<Eigen::Vector4f> createLabelSeeds(Eigen::Vector2i size, Eigen::Matrix4f viewProjection, std::shared_ptr<LabelsContainer> labels); }; } // namespace Placement #endif // SRC_PLACEMENT_APOLLONIUS_LABELS_ARRANGER_H_
#ifndef SRC_PLACEMENT_APOLLONIUS_LABELS_ARRANGER_H_ #define SRC_PLACEMENT_APOLLONIUS_LABELS_ARRANGER_H_ #include <Eigen/Core> #include <memory> #include <vector> #include "./labels_arranger.h" class CudaArrayProvider; namespace Placement { /** * \brief Returns the labels in an order defined by the apollonius graph * */ class ApolloniusLabelsArranger : public LabelsArranger { public: ApolloniusLabelsArranger() = default; void initialize(std::shared_ptr<CudaArrayProvider> distanceTransformTextureMapper, std::shared_ptr<CudaArrayProvider> apolloniusTextureMapper); virtual std::vector<Label> getArrangement(const LabellerFrameData &frameData, std::shared_ptr<LabelsContainer> labels); private: std::shared_ptr<CudaArrayProvider> distanceTransformTextureMapper; std::shared_ptr<CudaArrayProvider> apolloniusTextureMapper; std::vector<Eigen::Vector4f> createLabelSeeds(Eigen::Vector2i size, Eigen::Matrix4f viewProjection, std::shared_ptr<LabelsContainer> labels); }; } // namespace Placement #endif // SRC_PLACEMENT_APOLLONIUS_LABELS_ARRANGER_H_
Remove unused and not implement ApolloniusLabelsArranger destructor.
Remove unused and not implement ApolloniusLabelsArranger destructor.
C
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
1912ee2e5a92ebde98aad2835b8ea5eef918cd8f
CefSharp.Core/Internals/CefRequestCallbackWrapper.h
CefSharp.Core/Internals/CefRequestCallbackWrapper.h
// Copyright 2010-2015 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #pragma once #include "Stdafx.h" using namespace CefSharp; namespace CefSharp { namespace Internals { public ref class CefRequestCallbackWrapper : public IRequestCallback { private: MCefRefPtr<CefRequestCallback> _callback; IFrame^ _frame; IRequest^ _request; internal: CefRequestCallbackWrapper(CefRefPtr<CefRequestCallback> &callback) : _callback(callback) { } CefRequestCallbackWrapper( CefRefPtr<CefRequestCallback> &callback, IFrame^ frame, IRequest^ request) : _callback(callback), _frame(frame), _request(request) { } !CefRequestCallbackWrapper() { _callback = NULL; } ~CefRequestCallbackWrapper() { this->!CefRequestCallbackWrapper(); delete _requestWrapper; _requestWrapper = nullptr; delete _frame; _frame = nullptr; } public: virtual void Continue(bool allow) { _callback->Continue(allow); delete this; } virtual void Cancel() { _callback->Cancel(); delete this; } }; } }
// Copyright 2010-2015 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #pragma once #include "Stdafx.h" using namespace CefSharp; namespace CefSharp { namespace Internals { public ref class CefRequestCallbackWrapper : public IRequestCallback { private: MCefRefPtr<CefRequestCallback> _callback; IFrame^ _frame; IRequest^ _request; internal: CefRequestCallbackWrapper(CefRefPtr<CefRequestCallback> &callback) : _callback(callback) { } CefRequestCallbackWrapper( CefRefPtr<CefRequestCallback> &callback, IFrame^ frame, IRequest^ request) : _callback(callback), _frame(frame), _request(request) { } !CefRequestCallbackWrapper() { _callback = NULL; } ~CefRequestCallbackWrapper() { this->!CefRequestCallbackWrapper(); delete _request; _request = nullptr; delete _frame; _frame = nullptr; } public: virtual void Continue(bool allow) { _callback->Continue(allow); delete this; } virtual void Cancel() { _callback->Cancel(); delete this; } }; } }
Fix build issue from prev. merge.
Fix build issue from prev. merge.
C
bsd-3-clause
haozhouxu/CefSharp,VioletLife/CefSharp,joshvera/CefSharp,ITGlobal/CefSharp,windygu/CefSharp,AJDev77/CefSharp,yoder/CefSharp,haozhouxu/CefSharp,jamespearce2006/CefSharp,ruisebastiao/CefSharp,VioletLife/CefSharp,haozhouxu/CefSharp,joshvera/CefSharp,yoder/CefSharp,windygu/CefSharp,illfang/CefSharp,dga711/CefSharp,Haraguroicha/CefSharp,jamespearce2006/CefSharp,AJDev77/CefSharp,gregmartinhtc/CefSharp,rlmcneary2/CefSharp,twxstar/CefSharp,windygu/CefSharp,VioletLife/CefSharp,joshvera/CefSharp,gregmartinhtc/CefSharp,gregmartinhtc/CefSharp,illfang/CefSharp,Haraguroicha/CefSharp,wangzheng888520/CefSharp,zhangjingpu/CefSharp,twxstar/CefSharp,Haraguroicha/CefSharp,rlmcneary2/CefSharp,jamespearce2006/CefSharp,Livit/CefSharp,Haraguroicha/CefSharp,jamespearce2006/CefSharp,twxstar/CefSharp,Livit/CefSharp,AJDev77/CefSharp,ruisebastiao/CefSharp,ruisebastiao/CefSharp,yoder/CefSharp,jamespearce2006/CefSharp,wangzheng888520/CefSharp,AJDev77/CefSharp,dga711/CefSharp,battewr/CefSharp,joshvera/CefSharp,NumbersInternational/CefSharp,NumbersInternational/CefSharp,rlmcneary2/CefSharp,zhangjingpu/CefSharp,Haraguroicha/CefSharp,ITGlobal/CefSharp,illfang/CefSharp,battewr/CefSharp,dga711/CefSharp,dga711/CefSharp,ITGlobal/CefSharp,zhangjingpu/CefSharp,NumbersInternational/CefSharp,battewr/CefSharp,gregmartinhtc/CefSharp,wangzheng888520/CefSharp,Livit/CefSharp,NumbersInternational/CefSharp,wangzheng888520/CefSharp,VioletLife/CefSharp,rlmcneary2/CefSharp,twxstar/CefSharp,Livit/CefSharp,ruisebastiao/CefSharp,illfang/CefSharp,battewr/CefSharp,zhangjingpu/CefSharp,haozhouxu/CefSharp,windygu/CefSharp,yoder/CefSharp,ITGlobal/CefSharp
6bfe949dbd60e78c6a7d9ecc438f38e69e50f757
src/modules/linsys/factory.c
src/modules/linsys/factory.c
/* * factory.c for Linsys SDI consumer */ #include <framework/mlt.h> #include <string.h> extern mlt_consumer consumer_SDIstream_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); MLT_REPOSITORY { MLT_REGISTER( consumer_type, "linsys_sdi", consumer_SDIstream_init ); }
/* * factory.c for Linsys SDI consumer */ #include <framework/mlt.h> #include <string.h> extern mlt_consumer consumer_SDIstream_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ); MLT_REPOSITORY { MLT_REGISTER( consumer_type, "sdi", consumer_SDIstream_init ); }
Change linssys_sdi consumer to just "sdi"
Change linssys_sdi consumer to just "sdi"
C
lgpl-2.1
gmarco/mlt-orig,zzhhui/mlt,siddharudh/mlt,anba8005/mlt,ttill/MLT-roto-tracking,wideioltd/mlt,ttill/MLT-roto,ttill/MLT-roto,wideioltd/mlt,ttill/MLT-roto-tracking,ttill/MLT-roto-tracking,ttill/MLT,ttill/MLT,xzhavilla/mlt,wideioltd/mlt,xzhavilla/mlt,anba8005/mlt,xzhavilla/mlt,gmarco/mlt-orig,mltframework/mlt,ttill/MLT-roto-tracking,anba8005/mlt,mltframework/mlt,ttill/MLT-roto-tracking,j-b-m/mlt,ttill/MLT-roto-tracking,wideioltd/mlt,ttill/MLT-roto-tracking,ttill/MLT-roto-tracking,zzhhui/mlt,gmarco/mlt-orig,gmarco/mlt-orig,mltframework/mlt,mltframework/mlt,wideioltd/mlt,ttill/MLT,zzhhui/mlt,anba8005/mlt,j-b-m/mlt,j-b-m/mlt,ttill/MLT-roto,anba8005/mlt,siddharudh/mlt,mltframework/mlt,mltframework/mlt,zzhhui/mlt,ttill/MLT,xzhavilla/mlt,zzhhui/mlt,siddharudh/mlt,ttill/MLT-roto,anba8005/mlt,mltframework/mlt,j-b-m/mlt,ttill/MLT,xzhavilla/mlt,gmarco/mlt-orig,ttill/MLT,xzhavilla/mlt,ttill/MLT-roto,ttill/MLT,zzhhui/mlt,wideioltd/mlt,siddharudh/mlt,zzhhui/mlt,siddharudh/mlt,gmarco/mlt-orig,ttill/MLT-roto,j-b-m/mlt,j-b-m/mlt,mltframework/mlt,siddharudh/mlt,wideioltd/mlt,j-b-m/mlt,ttill/MLT-roto,siddharudh/mlt,siddharudh/mlt,zzhhui/mlt,xzhavilla/mlt,wideioltd/mlt,xzhavilla/mlt,gmarco/mlt-orig,ttill/MLT,anba8005/mlt,ttill/MLT-roto,anba8005/mlt,anba8005/mlt,xzhavilla/mlt,ttill/MLT,j-b-m/mlt,mltframework/mlt,ttill/MLT-roto-tracking,zzhhui/mlt,siddharudh/mlt,ttill/MLT-roto,mltframework/mlt,gmarco/mlt-orig,gmarco/mlt-orig,j-b-m/mlt,wideioltd/mlt,j-b-m/mlt
fcb91db238536949ceca5bcbe9c93b61b658240a
src/matchers/EXPMatchers+beIdenticalTo.h
src/matchers/EXPMatchers+beIdenticalTo.h
#import "Expecta.h" EXPMatcherInterface(beIdenticalTo, (void *expected));
#import "Expecta.h" EXPMatcherInterface(_beIdenticalTo, (void *expected)); #if __has_feature(objc_arc) #define beIdenticalTo(expected) _beIdenticalTo((__bridge void*)expected) #else #define beIdenticalTo _beIdenticalTo #endif
Fix ARC warning and avoid having to bridge id objects
Fix ARC warning and avoid having to bridge id objects
C
mit
iguchunhui/expecta,iosdev-republicofapps/expecta,ashfurrow/expecta,ashfurrow/expecta,Lightricks/expecta,specta/expecta,jmoody/expecta,jmburges/expecta,modocache/expecta,jmoody/expecta,suxinde2009/expecta,Bogon/expecta,github/expecta,tonyarnold/expecta,Bogon/expecta,Lightricks/expecta,jmburges/expecta,suxinde2009/expecta,iosdev-republicofapps/expecta,PatrykKaczmarek/expecta,modocache/expecta,tonyarnold/expecta,iosdev-republicofapps/expecta,ashfurrow/expecta,github/expecta,tonyarnold/expecta,PatrykKaczmarek/expecta,PatrykKaczmarek/expecta,tonyarnold/expecta,jmoody/expecta,udemy/expecta,ashfurrow/expecta,jmoody/expecta,iosdev-republicofapps/expecta,udemy/expecta,jmburges/expecta,wessmith/expecta,PatrykKaczmarek/expecta,iguchunhui/expecta,jmburges/expecta,modocache/expecta,modocache/expecta,wessmith/expecta
20cf8ae478c2712d4c211b49868e334357f05356
src/include/storage/copydir.h
src/include/storage/copydir.h
/*------------------------------------------------------------------------- * * copydir.h * Header for src/port/copydir.c compatibility functions. * * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/storage/copydir.h * *------------------------------------------------------------------------- */ #ifndef COPYDIR_H #define COPYDIR_H extern void copydir(char *fromdir, char *todir, bool recurse); #endif /* COPYDIR_H */
/*------------------------------------------------------------------------- * * copydir.h * Copy a directory. * * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/storage/copydir.h * *------------------------------------------------------------------------- */ #ifndef COPYDIR_H #define COPYDIR_H extern void copydir(char *fromdir, char *todir, bool recurse); #endif /* COPYDIR_H */
Fix copy-and-pasteo a little more completely.
Fix copy-and-pasteo a little more completely. copydir.c is no longer in src/port
C
apache-2.0
50wu/gpdb,50wu/gpdb,arcivanov/postgres-xl,pavanvd/postgres-xl,Postgres-XL/Postgres-XL,pavanvd/postgres-xl,techdragon/Postgres-XL,oberstet/postgres-xl,adam8157/gpdb,lisakowen/gpdb,tpostgres-projects/tPostgres,xinzweb/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,techdragon/Postgres-XL,postmind-net/postgres-xl,tpostgres-projects/tPostgres,ovr/postgres-xl,snaga/postgres-xl,ashwinstar/gpdb,snaga/postgres-xl,tpostgres-projects/tPostgres,lisakowen/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,snaga/postgres-xl,kmjungersen/PostgresXL,postmind-net/postgres-xl,ashwinstar/gpdb,pavanvd/postgres-xl,oberstet/postgres-xl,yazun/postgres-xl,greenplum-db/gpdb,techdragon/Postgres-XL,snaga/postgres-xl,oberstet/postgres-xl,ashwinstar/gpdb,ovr/postgres-xl,xinzweb/gpdb,postmind-net/postgres-xl,lisakowen/gpdb,adam8157/gpdb,kmjungersen/PostgresXL,adam8157/gpdb,jmcatamney/gpdb,yazun/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,Postgres-XL/Postgres-XL,postmind-net/postgres-xl,lisakowen/gpdb,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,greenplum-db/gpdb,adam8157/gpdb,yazun/postgres-xl,xinzweb/gpdb,lisakowen/gpdb,oberstet/postgres-xl,xinzweb/gpdb,greenplum-db/gpdb,50wu/gpdb,ovr/postgres-xl,greenplum-db/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,lisakowen/gpdb,oberstet/postgres-xl,zeroae/postgres-xl,kmjungersen/PostgresXL,adam8157/gpdb,arcivanov/postgres-xl,techdragon/Postgres-XL,zeroae/postgres-xl,arcivanov/postgres-xl,jmcatamney/gpdb,50wu/gpdb,50wu/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,zeroae/postgres-xl,adam8157/gpdb,snaga/postgres-xl,lisakowen/gpdb,tpostgres-projects/tPostgres,ovr/postgres-xl,greenplum-db/gpdb,Postgres-XL/Postgres-XL,zeroae/postgres-xl,arcivanov/postgres-xl,xinzweb/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,arcivanov/postgres-xl,kmjungersen/PostgresXL,ovr/postgres-xl,tpostgres-projects/tPostgres,greenplum-db/gpdb,zeroae/postgres-xl,postmind-net/postgres-xl,yazun/postgres-xl,ashwinstar/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,Postgres-XL/Postgres-XL,adam8157/gpdb,yazun/postgres-xl,50wu/gpdb,ashwinstar/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,ashwinstar/gpdb
5ce583eacdc66fec34b8788793170b3f860f14b5
ComponentKit/Debug/CKComponentHierarchyDebugHelper.h
ComponentKit/Debug/CKComponentHierarchyDebugHelper.h
/* * Copyright (c) 2014-present, 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. * */ #import <Foundation/Foundation.h> #import <ComponentKit/CKComponentViewConfiguration.h> @class CKComponent; @class UIView; /** CKComponentHierarchyDebugHelper allows */ @interface CKComponentHierarchyDebugHelper : NSObject /** Describe the component hierarchy starting from the window. This recursively searches downwards in the view hierarchy to find views which have a lifecycle manager, from which we can get the component layout hierarchies. @return A string with a description of the hierarchy. */ + (NSString *)componentHierarchyDescription; @end
/* * Copyright (c) 2014-present, 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. * */ #import <Foundation/Foundation.h> #import <ComponentKit/CKComponentViewConfiguration.h> @class CKComponent; @class UIView; /** CKComponentHierarchyDebugHelper allows */ @interface CKComponentHierarchyDebugHelper : NSObject /** Describe the component hierarchy starting from the window. This recursively searches downwards in the view hierarchy to find views which have a lifecycle manager, from which we can get the component layout hierarchies. @return A string with a description of the hierarchy. */ + (NSString *)componentHierarchyDescription NS_EXTENSION_UNAVAILABLE("Recursively describes components using -[UIApplication keyWindow]"); @end
Mark remaining APIs unsafe in extensions
Mark remaining APIs unsafe in extensions This is a follow up to #534 that should help us close out #390.
C
bsd-3-clause
bricooke/componentkit,yiding/componentkit,dshahidehpour/componentkit,eczarny/componentkit,avnerbarr/componentkit,dshahidehpour/componentkit,dshahidehpour/componentkit,bricooke/componentkit,bricooke/componentkit,MDSilber/componentkit,eczarny/componentkit,MDSilber/componentkit,yiding/componentkit,bricooke/componentkit,MDSilber/componentkit,yiding/componentkit,eczarny/componentkit,avnerbarr/componentkit,yiding/componentkit,MDSilber/componentkit,avnerbarr/componentkit,avnerbarr/componentkit
51e169a1422fe902f3b9aa165e7058ea636baf22
Modules/Common/include/mirtkStatus.h
Modules/Common/include/mirtkStatus.h
/* * Medical Image Registration ToolKit (MIRTK) * * Copyright 2013-2015 Imperial College London * Copyright 2013-2015 Andreas Schuh * * 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 MIRTK_Status_H #define MIRTK_Status_H namespace mirtk { // ----------------------------------------------------------------------------- /// Enumeration of common states for entities such as objective function parameters enum Status { Active, Passive, }; } // namespace mirtk #endif // MIRTK_Status_H
/* * Medical Image Registration ToolKit (MIRTK) * * Copyright 2013-2015 Imperial College London * Copyright 2013-2015 Andreas Schuh * * 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 MIRTK_Status_H #define MIRTK_Status_H namespace mirtk { // ----------------------------------------------------------------------------- /// Enumeration of common states for entities such as objective function parameters enum Status { Active, Passive }; } // namespace mirtk #endif // MIRTK_Status_H
Remove needless comma after last enumeration value
style: Remove needless comma after last enumeration value [Common]
C
apache-2.0
schuhschuh/MIRTK,BioMedIA/MIRTK,schuhschuh/MIRTK,BioMedIA/MIRTK,stefanpsz/MIRTK,stefanpsz/MIRTK,stefanpsz/MIRTK,schuhschuh/MIRTK,BioMedIA/MIRTK,BioMedIA/MIRTK,schuhschuh/MIRTK,stefanpsz/MIRTK
71b7d664f70030e12ccd7f99729f50861fb4e858
Engine/Entity.h
Engine/Entity.h
#ifndef __ENTITY_H__ #define __ENTITY_H__ #include "ModuleCollision.h" class Entity { public: Entity() : parent(nullptr) {} Entity(Entity* parent) : parent(parent) {} virtual ~Entity() {} // Entity lifecycle methods virtual bool Start() { return true; } virtual bool Start(bool active) { this->active = active; return true; } bool Enable() { if (!active) return active = Start(); return true; } bool Disable() { if (active) return active = !CleanUp(); return false; } virtual void PreUpdate() {} virtual void Update() {} virtual void PostUpdate() {} virtual bool CleanUp() { return true; } // Callbacks virtual bool OnCollision(Collider origin, Collider other) { return true; } private: bool active = true; Entity* parent; }; #endif // __ENTITY_H__
#ifndef __ENTITY_H__ #define __ENTITY_H__ #include "ModuleCollision.h" class Entity { public: Entity() : Parent(nullptr) {} Entity(Entity* parent) : Parent(parent) {} virtual ~Entity() {} // Entity lifecycle methods virtual bool Start() { return true; } virtual bool Start(bool active) { this->_active = active; return true; } bool Enable() { if (!_active) return _active = Start(); return true; } bool Disable() { if (_active) return _active = !CleanUp(); return false; } virtual void PreUpdate() {} virtual void Update() {} virtual void PostUpdate() {} virtual bool CleanUp() { return true; } // Callbacks virtual bool OnCollision(Collider origin, Collider other) { return true; } public: Entity* Parent; private: bool _active = true; }; #endif // __ENTITY_H__
Adjust entity class to naming conventions
Adjust entity class to naming conventions references #3
C
mit
jowie94/The-Simpsons-Arcade,jowie94/The-Simpsons-Arcade
c68037fdc18d4dade36611a4a93dcc3fbbcfa045
bin/test_date.c
bin/test_date.c
#include <stdio.h> #include <time.h> #include <stdlib.h> int check_date(struct tm *date, time_t time, char *name) { if( date == NULL ) { printf("%s(%lld) returned null\n", name, (long long)time); return 1; } else { printf("%s(%lld): %s\n", name, (long long)time, asctime(date)); return 0; } } int main(int argc, char *argv[]) { long long number; time_t time; struct tm *localdate; struct tm *gmdate; if( argc <= 1 ) { printf("usage: %s <time>\n", argv[0]); return 1; } number = strtoll(argv[1], NULL, 0); time = (time_t)number; printf("input: %lld, time: %lld\n", number, (long long)time); if( time != number ) { printf("time_t overflowed\n"); return 0; } localdate = localtime(&time); gmdate = gmtime(&time); check_date(localdate, time, "localtime"); check_date(gmdate, time, "gmtime"); return 0; }
#include <stdio.h> #include <time.h> #include <stdlib.h> int check_date(struct tm *date, time_t time, char *name) { if( date == NULL ) { printf("%s(%lld) returned null\n", name, (long long)time); return 1; } else { printf("%s(%lld): %s\n", name, (long long)time, asctime(date)); return 0; } } int main(int argc, char *argv[]) { long long number; time_t time; struct tm *localdate; struct tm *gmdate; if( argc <= 1 ) { printf("usage: %s <time>\n", argv[0]); return 1; } printf("sizeof time_t: %ld, tm.tm_year: %ld\n", sizeof(time_t), sizeof(gmdate->tm_year)); number = strtoll(argv[1], NULL, 0); time = (time_t)number; printf("input: %lld, time: %lld\n", number, (long long)time); if( time != number ) { printf("time_t overflowed\n"); return 0; } localdate = localtime(&time); gmdate = gmtime(&time); check_date(localdate, time, "localtime"); check_date(gmdate, time, "gmtime"); return 0; }
Print out the size of time_t and tm.tm_year for debugging porpuses.
Print out the size of time_t and tm.tm_year for debugging porpuses.
C
mit
chromatic/y2038,chromatic/y2038,evalEmpire/y2038,bulk88/y2038,schwern/y2038,chromatic/y2038,foxtacles/y2038,foxtacles/y2038,bulk88/y2038,bulk88/y2038,evalEmpire/y2038,schwern/y2038
5c4a5fd8eeef6942ff79b519aa86b195a1e70aaf
Wikipedia/Code/WMFAnalyticsLogging.h
Wikipedia/Code/WMFAnalyticsLogging.h
#import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @protocol WMFAnalyticsLogging <NSObject> - (NSString*)analyticsName; @end NS_ASSUME_NONNULL_END
#import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @protocol WMFAnalyticsContextProviding <NSObject> - (NSString*)analyticsContext; @end @protocol WMFAnalyticsContentTypeProviding <NSObject> - (NSString*)analyticsContentType; @end @protocol WMFAnalyticsViewNameProviding <NSObject> - (NSString*)analyticsName; @end NS_ASSUME_NONNULL_END
Add additional protocols for tracking context, content type, and analytics name
Add additional protocols for tracking context, content type, and analytics name
C
mit
anirudh24seven/wikipedia-ios,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,bgerstle/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/wikipedia-ios,bgerstle/wikipedia-ios,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,anirudh24seven/wikipedia-ios,bgerstle/wikipedia-ios,wikimedia/wikipedia-ios,josve05a/wikipedia-ios,anirudh24seven/wikipedia-ios,anirudh24seven/wikipedia-ios,bgerstle/wikipedia-ios,anirudh24seven/wikipedia-ios,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,montehurd/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,julienbodet/wikipedia-ios,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,anirudh24seven/wikipedia-ios,bgerstle/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,anirudh24seven/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,anirudh24seven/wikipedia-ios,montehurd/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,bgerstle/wikipedia-ios,wikimedia/wikipedia-ios,julienbodet/wikipedia-ios,bgerstle/wikipedia-ios,bgerstle/wikipedia-ios,wikimedia/apps-ios-wikipedia
83b7ba154c3b7735685315c7dbbf2083945b947c
board.h
board.h
#ifndef __BOARD_H #define __BOARD_H #ifdef __cplusplus extern "C" { #endif #define F_OSC0 12000000UL #define F_OSC1 0UL #define F_CPU 66000000UL #define HSBMASK_DEFAULT 0xFFFFFFFF #define PBAMASK_DEFAULT 0xFFFFFFFF #define PBBMASK_DEFAULT 0xFFFFFFFF void init_board(void); #ifdef __cplusplus } #endif #endif
#ifndef __BOARD_H #define __BOARD_H #ifdef __cplusplus extern "C" { #endif #define ADC_VREF 3.0 #define ADC_BITS 10 #define F_CPU 66000000UL #define F_OSC0 12000000UL #define F_OSC1 0UL #define HSBMASK_DEFAULT 0xFFFFFFFF #define PBAMASK_DEFAULT 0xFFFFFFFF #define PBBMASK_DEFAULT 0xFFFFFFFF void init_board(void); static inline double cnv2volt(uint16_t cnv) { return cnv * (ADC_VREF / (1U << ADC_BITS)); } #ifdef __cplusplus } #endif #endif
Add adc settings and a function to calculate the conversion
Add adc settings and a function to calculate the conversion
C
bsd-3-clause
denravonska/aery32,aery32/aery32,denravonska/aery32,aery32/aery32
9c6ef2d2e6fc944267fb3a857d5797afb9efcb06
queue.c
queue.c
#include "queue.h" struct Queue { size_t head; size_t tail; size_t size; void** e; }; Queue* Queue_Create(size_t n) { Queue* q = (Queue *)malloc(sizeof(Queue)); q->size = n; q->head = q->tail = 1; q->e = (void **)malloc(sizeof(void*) * (n + 1)); }
#include "queue.h" struct Queue { size_t head; size_t tail; size_t size; void** e; }; Queue* Queue_Create(size_t n) { Queue* q = (Queue *)malloc(sizeof(Queue)); q->size = n; q->head = q->tail = 1; q->e = (void **)malloc(sizeof(void*) * (n + 1)); return q; }
Add missing return after Queue creation
Add missing return after Queue creation
C
mit
MaxLikelihood/CADT
6ae7b4776f1cbafb5703376cb806572667070b8d
libc/sysdeps/linux/common/getrusage.c
libc/sysdeps/linux/common/getrusage.c
/* vi: set sw=4 ts=4: */ /* * getrusage() for uClibc * * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org> * * GNU Library General Public License (LGPL) version 2 or later. */ #include "syscalls.h" #include <unistd.h> #include <wait.h> _syscall2(int, getrusage, int, who, struct rusage *, usage);
/* vi: set sw=4 ts=4: */ /* * getrusage() for uClibc * * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org> * * GNU Library General Public License (LGPL) version 2 or later. */ #include "syscalls.h" #include <unistd.h> #include <wait.h> _syscall2(int, getrusage, __rusage_who_t, who, struct rusage *, usage);
Correct type, gcc-3.4.5 fails, thanks nitinkg for reporting/testing
Correct type, gcc-3.4.5 fails, thanks nitinkg for reporting/testing
C
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
3951fae51d776d05e871ee5a7beb62fb832985b1
src/port/pthread-win32.h
src/port/pthread-win32.h
#ifndef __PTHREAD_H #define __PTHREAD_H typedef ULONG pthread_key_t; typedef HANDLE pthread_mutex_t; typedef int pthread_once_t; DWORD pthread_self(void); void pthread_setspecific(pthread_key_t, void *); void *pthread_getspecific(pthread_key_t); void pthread_mutex_init(pthread_mutex_t *, void *attr); void pthread_mutex_lock(pthread_mutex_t *); /* blocking */ void pthread_mutex_unlock(pthread_mutex_t *); #endif
#ifndef __PTHREAD_H #define __PTHREAD_H typedef ULONG pthread_key_t; typedef HANDLE pthread_mutex_t; typedef int pthread_once_t; DWORD pthread_self(void); void pthread_setspecific(pthread_key_t, void *); void *pthread_getspecific(pthread_key_t); int pthread_mutex_init(pthread_mutex_t *, void *attr); int pthread_mutex_lock(pthread_mutex_t *); /* blocking */ int pthread_mutex_unlock(pthread_mutex_t *); #endif
Fix declarations of pthread functions, missed in recent commit.
Fix declarations of pthread functions, missed in recent commit.
C
agpl-3.0
tpostgres-projects/tPostgres,50wu/gpdb,jmcatamney/gpdb,Chibin/gpdb,Postgres-XL/Postgres-XL,Postgres-XL/Postgres-XL,ovr/postgres-xl,techdragon/Postgres-XL,Chibin/gpdb,xinzweb/gpdb,adam8157/gpdb,pavanvd/postgres-xl,kmjungersen/PostgresXL,50wu/gpdb,ovr/postgres-xl,lisakowen/gpdb,ovr/postgres-xl,greenplum-db/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,edespino/gpdb,xinzweb/gpdb,edespino/gpdb,postmind-net/postgres-xl,techdragon/Postgres-XL,ashwinstar/gpdb,oberstet/postgres-xl,yuanzhao/gpdb,jmcatamney/gpdb,zeroae/postgres-xl,arcivanov/postgres-xl,jmcatamney/gpdb,adam8157/gpdb,snaga/postgres-xl,50wu/gpdb,50wu/gpdb,arcivanov/postgres-xl,adam8157/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,tpostgres-projects/tPostgres,yazun/postgres-xl,kmjungersen/PostgresXL,arcivanov/postgres-xl,edespino/gpdb,Chibin/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,kmjungersen/PostgresXL,techdragon/Postgres-XL,lisakowen/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,oberstet/postgres-xl,postmind-net/postgres-xl,zeroae/postgres-xl,oberstet/postgres-xl,yazun/postgres-xl,zeroae/postgres-xl,Chibin/gpdb,yazun/postgres-xl,yuanzhao/gpdb,ashwinstar/gpdb,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,adam8157/gpdb,tpostgres-projects/tPostgres,edespino/gpdb,pavanvd/postgres-xl,yazun/postgres-xl,snaga/postgres-xl,ashwinstar/gpdb,Chibin/gpdb,postmind-net/postgres-xl,yuanzhao/gpdb,yuanzhao/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl,Postgres-XL/Postgres-XL,Chibin/gpdb,Postgres-XL/Postgres-XL,edespino/gpdb,lisakowen/gpdb,edespino/gpdb,yuanzhao/gpdb,adam8157/gpdb,jmcatamney/gpdb,lisakowen/gpdb,yuanzhao/gpdb,Chibin/gpdb,greenplum-db/gpdb,lisakowen/gpdb,50wu/gpdb,adam8157/gpdb,pavanvd/postgres-xl,Chibin/gpdb,lisakowen/gpdb,jmcatamney/gpdb,tpostgres-projects/tPostgres,lisakowen/gpdb,edespino/gpdb,techdragon/Postgres-XL,kmjungersen/PostgresXL,greenplum-db/gpdb,Chibin/gpdb,postmind-net/postgres-xl,xinzweb/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl,ashwinstar/gpdb,adam8157/gpdb,snaga/postgres-xl,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,techdragon/Postgres-XL,yazun/postgres-xl,yuanzhao/gpdb,pavanvd/postgres-xl,oberstet/postgres-xl,greenplum-db/gpdb,tpostgres-projects/tPostgres,edespino/gpdb,oberstet/postgres-xl,xinzweb/gpdb,xinzweb/gpdb,pavanvd/postgres-xl,zeroae/postgres-xl,greenplum-db/gpdb,snaga/postgres-xl,ovr/postgres-xl,ovr/postgres-xl,Chibin/gpdb,50wu/gpdb,snaga/postgres-xl,edespino/gpdb,yuanzhao/gpdb,jmcatamney/gpdb,edespino/gpdb,ashwinstar/gpdb,zeroae/postgres-xl
9d7343347b61a9e0110b8ba81cdd66b5c5ea0bac
src/sas/readstat_xport.c
src/sas/readstat_xport.c
#include <stdint.h> #include "readstat_xport.h" #include "../readstat_bits.h" char _xport_months[12][4] = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" }; void xport_namestr_bswap(xport_namestr_t *namestr) { if (!machine_is_little_endian()) return; namestr->ntype = byteswap2(namestr->ntype); namestr->nhfun = byteswap2(namestr->nhfun); namestr->nlng = byteswap2(namestr->nlng); namestr->nvar0 = byteswap2(namestr->nlng); namestr->nfl = byteswap2(namestr->nfl); namestr->nfd = byteswap2(namestr->nfd); namestr->nfj = byteswap2(namestr->nfj); namestr->nifl = byteswap2(namestr->nifl); namestr->nifd = byteswap2(namestr->nifd); namestr->npos = byteswap4(namestr->npos); namestr->labeln = byteswap2(namestr->labeln); }
#include <stdint.h> #include "readstat_xport.h" #include "../readstat_bits.h" char _xport_months[12][4] = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" }; void xport_namestr_bswap(xport_namestr_t *namestr) { if (!machine_is_little_endian()) return; namestr->ntype = byteswap2(namestr->ntype); namestr->nhfun = byteswap2(namestr->nhfun); namestr->nlng = byteswap2(namestr->nlng); namestr->nvar0 = byteswap2(namestr->nvar0); namestr->nfl = byteswap2(namestr->nfl); namestr->nfd = byteswap2(namestr->nfd); namestr->nfj = byteswap2(namestr->nfj); namestr->nifl = byteswap2(namestr->nifl); namestr->nifd = byteswap2(namestr->nifd); namestr->npos = byteswap4(namestr->npos); namestr->labeln = byteswap2(namestr->labeln); }
Fix bug in XPORT byteswapping
Fix bug in XPORT byteswapping
C
mit
WizardMac/ReadStat,WizardMac/ReadStat
a512578fdd9e815f9244bc1d5a5fcd30464e8cbc
source/openta/ta_errors.h
source/openta/ta_errors.h
// Public domain. See "unlicense" statement at the end of this file. #define TA_ERROR_FAILED_TO_PARSE_CMDLINE -1 #define TA_ERROR_FAILED_TO_CREATE_GAME_CONTEXT -2 #define TA_ERROR_INVALID_ARGS -3
// Public domain. See "unlicense" statement at the end of this file. typedef int ta_result; #define TA_SUCCESS 0 #define TA_ERRORS -1 #define TA_INVALID_ARGS -2 #define TA_OUT_OF_MEMORY -3 #define TA_ERROR_FAILED_TO_PARSE_CMDLINE -1 #define TA_ERROR_FAILED_TO_CREATE_GAME_CONTEXT -2 #define TA_ERROR_INVALID_ARGS -3
Add a few result codes.
Add a few result codes.
C
mit
mackron/openta,mackron/openta
c9b72d350872bf0d23d3b7905c7f8169c7f91a8b
reverb/cc/conversions.h
reverb/cc/conversions.h
// Copyright 2019 DeepMind Technologies 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. #ifndef REVERB_CC_CONVERSIONS_H_ #define REVERB_CC_CONVERSIONS_H_ #include "numpy/arrayobject.h" #include "tensorflow/core/framework/types.h" #include "tensorflow/core/framework/tensor.h" namespace deepmind { namespace reverb { namespace pybind { void ImportNumpy(); tensorflow::Status TensorToNdArray(const tensorflow::Tensor &tensor, PyObject **out_ndarray); tensorflow::Status NdArrayToTensor(PyObject *ndarray, tensorflow::Tensor *out_tensor); tensorflow::Status GetPyDescrFromDataType(tensorflow::DataType dtype, PyArray_Descr **out_descr); } // namespace pybind } // namespace reverb } // namespace deepmind #endif // REVERB_CC_CONVERSIONS_H_
// Copyright 2019 DeepMind Technologies 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. #ifndef REVERB_CC_CONVERSIONS_H_ #define REVERB_CC_CONVERSIONS_H_ #include "numpy/arrayobject.h" #include "tensorflow/core/framework/types.h" #include "tensorflow/core/framework/tensor.h" namespace deepmind { namespace reverb { namespace pybind { // One MUST initialize Numpy, e.g. within the Pybind11 module definition before // calling C Numpy functions. // See https://pythonextensionpatterns.readthedocs.io/en/latest/cpp_and_numpy.html void ImportNumpy(); tensorflow::Status TensorToNdArray(const tensorflow::Tensor &tensor, PyObject **out_ndarray); tensorflow::Status NdArrayToTensor(PyObject *ndarray, tensorflow::Tensor *out_tensor); tensorflow::Status GetPyDescrFromDataType(tensorflow::DataType dtype, PyArray_Descr **out_descr); } // namespace pybind } // namespace reverb } // namespace deepmind #endif // REVERB_CC_CONVERSIONS_H_
Document why `ImportNumpy ` exists and when it should be used.
Document why `ImportNumpy ` exists and when it should be used. PiperOrigin-RevId: 474532725 Change-Id: I305a57456bcac3186389a733e16d962fcee99dee
C
apache-2.0
deepmind/reverb,deepmind/reverb,deepmind/reverb,deepmind/reverb
f160c0edd74d9f31c936b92c7e7e6b4c9fb6848e
src/engine/scriptwindow.h
src/engine/scriptwindow.h
#ifndef SCRIPTWINDOW_H #define SCRIPTWINDOW_H #include <stdint.h> #include <QHash> #include <QObject> #include <QScriptValue> class QScriptEngine; class ScriptWindow : public QObject { Q_OBJECT public: explicit ScriptWindow(const QScriptValue &originalWindow, QObject *parent = 0); QScriptValue toScriptValue(); Q_INVOKABLE int randomInt(int min = 0, int max = INT32_MAX) const; Q_INVOKABLE int setInterval(const QScriptValue &function, int delay); Q_INVOKABLE void clearInterval(int timerId); Q_INVOKABLE int setTimeout(const QScriptValue &function, int delay); Q_INVOKABLE void clearTimeout(int timerId); protected: virtual void timerEvent(QTimerEvent *event); private: QScriptEngine *m_engine; QScriptValue m_originalWindow; QHash<int, QScriptValue> m_intervalHash; QHash<int, QScriptValue> m_timeoutHash; }; #endif // SCRIPTWINDOW_H
#ifndef SCRIPTWINDOW_H #define SCRIPTWINDOW_H #include <QHash> #include <QObject> #include <QScriptValue> class QScriptEngine; class ScriptWindow : public QObject { Q_OBJECT public: explicit ScriptWindow(const QScriptValue &originalWindow, QObject *parent = 0); QScriptValue toScriptValue(); Q_INVOKABLE int randomInt(int min = 0, int max = 2147483647) const; Q_INVOKABLE int setInterval(const QScriptValue &function, int delay); Q_INVOKABLE void clearInterval(int timerId); Q_INVOKABLE int setTimeout(const QScriptValue &function, int delay); Q_INVOKABLE void clearTimeout(int timerId); protected: virtual void timerEvent(QTimerEvent *event); private: QScriptEngine *m_engine; QScriptValue m_originalWindow; QHash<int, QScriptValue> m_intervalHash; QHash<int, QScriptValue> m_timeoutHash; }; #endif // SCRIPTWINDOW_H
Fix compile error on Amazon EC2.
Fix compile error on Amazon EC2.
C
agpl-3.0
arendjr/PlainText,arendjr/PlainText,arendjr/PlainText
2fbd5548c56d6cbeef46248da67cb97455a3a7ec
apps/rldtest/rldtest.c
apps/rldtest/rldtest.c
/* ** Copyright 2002, Manuel J. Petit. All rights reserved. ** Distributed under the terms of the NewOS License. */ #include <stdio.h> #include <dlfcn.h> extern int fib(int); extern void shared_hello(void); int main() { void *freston; void *girlfriend; shared_hello(); printf("%d %d %d %d %d %d\n", fib(0), fib(1), fib(2), fib(3), fib(4), fib(5)); freston= dlopen("/boot/lib/girlfriend.so", RTLD_LAZY); girlfriend= dlsym(freston, "girlfriend"); ((void(*)(void))girlfriend)(); return 0; }
/* ** Copyright 2002, Manuel J. Petit. All rights reserved. ** Distributed under the terms of the NewOS License. */ #include <stdio.h> #include <dlfcn.h> extern int fib(int); extern void shared_hello(void); int main() { void *freston; void *girlfriend; shared_hello(); printf("%d %d %d %d %d %d\n", fib(0), fib(1), fib(2), fib(3), fib(4), fib(5)); freston= dlopen("/boot/lib/girlfriend.so", RTLD_NOW); girlfriend= dlsym(freston, "girlfriend"); ((void(*)(void))girlfriend)(); return 0; }
Fix serious bug. Should be RTLD_NOW... RTLD_LAZY does not work for getting a girlfriend.
Fix serious bug. Should be RTLD_NOW... RTLD_LAZY does not work for getting a girlfriend. git-svn-id: fb278a52ad97f7fbef074986829f2c6a2a3c4b34@547 c25cc9d1-44fa-0310-b259-ad778cb1d433
C
bsd-3-clause
dioptre/newos,travisg/newos,siraj/newos,zhouxh1023/newos,siraj/newos,siraj/newos,dioptre/newos,dioptre/newos,siraj/newos,travisg/newos,zhouxh1023/newos,travisg/newos,zhouxh1023/newos
4ea166194c7eec0262b3e30d9a599ea187a8591e
src/ios/KirinKit/KirinKit/Extensions/GWTServices/NewDatabaseAccessService.h
src/ios/KirinKit/KirinKit/Extensions/GWTServices/NewDatabaseAccessService.h
// // NewDatabasesImpl.h // KirinKit // // Created by Douglas Hoskins on 04/10/2013. // Copyright (c) 2013 Future Platforms. All rights reserved. // #import <Foundation/Foundation.h> #import "NSObject+Kirin.h" #import "KirinGwtServiceStub.h" #import "NewTransactionService.h" #import <toNative/DatabaseAccessServiceNative.h> @interface NewDatabaseAccessService : KirinGwtServiceStub<DatabaseAccessServiceNative> @property (strong, nonatomic) NSMutableDictionary * DbForId; @property (strong, nonatomic) NewTransactionService * NewTransactionService; @end
// // NewDatabasesImpl.h // KirinKit // // Created by Douglas Hoskins on 04/10/2013. // Copyright (c) 2013 Future Platforms. All rights reserved. // #import <Foundation/Foundation.h> #import "NSObject+Kirin.h" #import "KirinGwtServiceStub.h" #import "NewTransactionService.h" #import <toNative/DatabaseAccessServiceNative.h> #import "KirinSynchronousExecute.h" @interface NewDatabaseAccessService : KirinGwtServiceStub<DatabaseAccessServiceNative, KirinSynchronousExecute> @property (strong, nonatomic) NSMutableDictionary * DbForId; @property (strong, nonatomic) NewTransactionService * NewTransactionService; @end
Make KirinGwtServiceStub use KirinSynchronousExecute protocol
[ios] Make KirinGwtServiceStub use KirinSynchronousExecute protocol
C
apache-2.0
futureplatforms/Kirin,futureplatforms/Kirin,futureplatforms/Kirin,futureplatforms/Kirin,futureplatforms/Kirin
8709f4c305854a8e23e6c0fc868b7c9a65827707
src/String.h
src/String.h
//============================================================================= // String.h //============================================================================= #ifndef SRC_STRING_H_ #define SRC_STRING_H_ #include "AutoReleasePool.h" #include <string.h> //----------------------------------------------------------------------------- STRUCT String { const string str; const unsigned long size; } String; //----------------------------------------------------------------------------- String StringOf(const string); string newstring(AutoReleasePool*, unsigned long size); String newString(AutoReleasePool*, unsigned long size); string copystring(AutoReleasePool*, const string, unsigned long size); String copyString(AutoReleasePool*, const String, unsigned long size); String appendChar(AutoReleasePool*, const String, const CHAR, unsigned int increaseBy); string joinstrings(AutoReleasePool*, const string, const string); String joinStrings(AutoReleasePool*, const String, const String); String trimStringToSize(AutoReleasePool*, const String); unsigned int getAllocationCount(); //----------------------------------------------------------------------------- #endif // SRC_STRING_H_ //-----------------------------------------------------------------------------
//============================================================================= // String.h //============================================================================= #ifndef SRC_STRING_H_ #define SRC_STRING_H_ #include "AutoReleasePool.h" #include <string.h> //----------------------------------------------------------------------------- STRUCT String { string str; unsigned long size; } String; //----------------------------------------------------------------------------- String StringOf(const string); string newstring(AutoReleasePool*, unsigned long size); String newString(AutoReleasePool*, unsigned long size); string copystring(AutoReleasePool*, const string, unsigned long size); String copyString(AutoReleasePool*, const String, unsigned long size); String appendChar(AutoReleasePool*, const String, const CHAR, unsigned int increaseBy); string joinstrings(AutoReleasePool*, const string, const string); String joinStrings(AutoReleasePool*, const String, const String); String trimStringToSize(AutoReleasePool*, const String); unsigned int getAllocationCount(); //----------------------------------------------------------------------------- #endif // SRC_STRING_H_ //-----------------------------------------------------------------------------
Refactor - fix error in gcc compile
Refactor - fix error in gcc compile
C
apache-2.0
jasonxhill/okavangoc,jasonxhill/okavangoc
96bc2bb6c95cb61d0039c7da19cd7d172c668aa9
lib/libmid/errstr.c
lib/libmid/errstr.c
#include "../../include/mid.h" #include <SDL/SDL_error.h> #include <stdarg.h> #include <errno.h> #include <string.h> enum { Bufsz = 1024 }; static char curerr[Bufsz + 1]; void seterrstr(const char *fmt, ...) { va_list ap; va_start(ap, fmt); snprintf(curerr, Bufsz + 1, fmt, ap); va_end(ap); } const char *miderrstr(void){ int err = errno; if (curerr[0] != '\0') { static char retbuf[Bufsz + 1]; strncpy(retbuf, curerr, Bufsz); retbuf[Bufsz] = '\0'; curerr[0] = '\0'; return retbuf; } const char *e = SDL_GetError(); if(e[0] != '\0') return e; return strerror(err); }
#include "../../include/mid.h" #include <SDL/SDL_error.h> #include <stdarg.h> #include <errno.h> #include <string.h> enum { Bufsz = 1024 }; static char curerr[Bufsz + 1]; void seterrstr(const char *fmt, ...) { va_list ap; va_start(ap, fmt); vsnprintf(curerr, Bufsz + 1, fmt, ap); va_end(ap); } const char *miderrstr(void){ int err = errno; if (curerr[0] != '\0') { static char retbuf[Bufsz + 1]; strncpy(retbuf, curerr, Bufsz); retbuf[Bufsz] = '\0'; curerr[0] = '\0'; return retbuf; } const char *e = SDL_GetError(); if(e[0] != '\0') return e; return strerror(err); }
Call vsnprintf instead of just snprintf.
Call vsnprintf instead of just snprintf.
C
mit
velour/mid,velour/mid,velour/mid
dcf530dd0e811a75191bd0f86e53561db1a8ed44
config/config-mem.h
config/config-mem.h
/* * config-mem.h * * Copyright (c) 1996, 1997 * Transvirtual Technologies, Inc. All rights reserved. * * See the file "license.terms" for information on usage and redistribution * of this file. */ #ifndef __config_mem_h #define __config_mem_h #if defined(HAVE_STRING_H) #include <string.h> #endif #if defined(HAVE_MALLOC_H) #include <malloc.h> #endif #if defined(HAVE_ALLOCA_H) #include <alloca.h> #endif #if defined(HAVE_MEMORY_H) #include <memory.h> #endif #if defined(HAVE_MMAP) #include <sys/mman.h> #endif #if !defined(HAVE_MEMCPY) void bcopy(void*, void*, size_t); #define memcpy(_d, _s, _n) bcopy((_s), (_d), (_n)) #endif #if !defined(HAVE_MEMMOVE) /* use bcopy instead */ #define memmove(to,from,size) bcopy((from),(to),(size)) #endif #if !defined(HAVE_GETPAGESIZE) #define getpagesize() 8192 #endif #endif
/* * config-mem.h * * Copyright (c) 1996, 1997 * Transvirtual Technologies, Inc. All rights reserved. * * See the file "license.terms" for information on usage and redistribution * of this file. */ #ifndef __config_mem_h #define __config_mem_h #if defined(HAVE_STRING_H) #include <string.h> #endif #if defined(HAVE_MALLOC_H) #include <malloc.h> #endif #if defined(HAVE_ALLOCA_H) #include <alloca.h> #endif #if defined(HAVE_MEMORY_H) #include <memory.h> #endif #if defined(HAVE_MMAP) #include <sys/types.h> #include <sys/mman.h> #endif #if !defined(HAVE_MEMCPY) void bcopy(void*, void*, size_t); #define memcpy(_d, _s, _n) bcopy((_s), (_d), (_n)) #endif #if !defined(HAVE_MEMMOVE) /* use bcopy instead */ #define memmove(to,from,size) bcopy((from),(to),(size)) #endif #if !defined(HAVE_GETPAGESIZE) #define getpagesize() 8192 #endif #endif
Fix build problem under FreeBSD.
Fix build problem under FreeBSD.
C
lgpl-2.1
kaffe/kaffe,kaffe/kaffe,kaffe/kaffe,kaffe/kaffe,kaffe/kaffe
25d67e3ef084ff3894a235c2ab529f362524b89a
include/nekit/utils/async_io_interface.h
include/nekit/utils/async_io_interface.h
// MIT License // Copyright (c) 2017 Zhuhao Wang // 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. #pragma once #include <boost/asio.hpp> namespace nekit { namespace utils { class AsyncIoInterface { public: explicit AsyncIoInterface(boost::asio::io_service& io) : io_{&io} {}; ~AsyncIoInterface() = default; boost::asio::io_service& io() const { return *io_; } private: boost::asio::io_service* io_; }; } // namespace utils } // namespace nekit
// MIT License // Copyright (c) 2017 Zhuhao Wang // 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. #pragma once #include <boost/asio.hpp> namespace nekit { namespace utils { class AsyncIoInterface { public: virtual ~AsyncIoInterface() = default; // It must be guaranteed that any `io_context` that will be returned by any // instances of this interface should not be released before all instances are // released. virtual boost::asio::io_context* io() = 0; }; } // namespace utils } // namespace nekit
Make AsyncIoInterface a pure interface
REFACTOR: Make AsyncIoInterface a pure interface
C
mit
zhuhaow/libnekit,zhuhaow/libnekit,zhuhaow/libnekit,zhuhaow/libnekit
3281226fa2caa220f9654fa3c6734f56962792a2
prefix.h
prefix.h
#ifndef KLETCH_MATH_PREFIX_H #define KLETCH_MATH_PREFIX_H #include <utility> #include <tuple> #include <iostream> #include <limits> #include "special_functions.h" namespace kletch { #ifdef KLETCH_USE_DOUBLES typedef double real; #else typedef float real; #endif template <typename T> inline constexpr real rl(T number) { return static_cast<real>(number); } using std::swap; typedef std::numeric_limits<double> double_limits; typedef std::numeric_limits<float> float_limits; typedef std::numeric_limits<real> real_limits; } // namespace kletch #endif // KLETCH_MATH_PREFIX_H
#ifndef KLETCH_MATH_PREFIX_H #define KLETCH_MATH_PREFIX_H #include <utility> #include <tuple> #include <iostream> #include <limits> #include "special_functions.h" namespace kletch { #ifdef KLETCH_WITH_DOUBLE typedef double real; #else typedef float real; #endif template <typename T> inline constexpr real rl(T number) { return static_cast<real>(number); } using std::swap; typedef std::numeric_limits<double> double_limits; typedef std::numeric_limits<float> float_limits; typedef std::numeric_limits<real> real_limits; } // namespace kletch #endif // KLETCH_MATH_PREFIX_H
Make ReferenceFresnelTest th config dependent
Make ReferenceFresnelTest th config dependent
C
unlicense
mkacz91/math
642e338cf79c78704ebfa7833fdd148f561921f5
sw/device/lib/dif/dif_warn_unused_result.h
sw/device/lib/dif/dif_warn_unused_result.h
// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #ifndef OPENTITAN_SW_DEVICE_LIB_DIF_DIF_WARN_UNUSED_RESULT_H_ #define OPENTITAN_SW_DEVICE_LIB_DIF_DIF_WARN_UNUSED_RESULT_H_ /** * @file * @brief Unused Result Warning Macro for DIFs. */ // Header Extern Guard (so header can be used from C and C++) #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Attribute for functions which return errors that must be acknowledged. * * This attribute must be used to mark all DIFs which return an error value of * some kind, to ensure that callers do not accidentally drop the error on the * ground. */ #define DIF_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif // OPENTITAN_SW_DEVICE_LIB_DIF_DIF_WARN_UNUSED_RESULT_H_
// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #ifndef OPENTITAN_SW_DEVICE_LIB_DIF_DIF_WARN_UNUSED_RESULT_H_ #define OPENTITAN_SW_DEVICE_LIB_DIF_DIF_WARN_UNUSED_RESULT_H_ /** * @file * @brief Unused Result Warning Macro for DIFs. */ // Header Extern Guard (so header can be used from C and C++) #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Attribute for functions which return errors that must be acknowledged. * * This attribute must be used to mark all DIFs which return an error value of * some kind, to ensure that callers do not accidentally drop the error on the * ground. * * Normally, the standard way to drop such a value on the ground explicitly is * with the syntax `(void)expr;`, in analogy with the behavior of C++'s * `[[nodiscard]]` attribute. * However, GCC does not implement this, so the idiom `if (expr) {}` should be * used instead, for the time being. * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509. */ #define DIF_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif // OPENTITAN_SW_DEVICE_LIB_DIF_DIF_WARN_UNUSED_RESULT_H_
Add a comment explaining how to drop an error on the ground
[dif] Add a comment explaining how to drop an error on the ground See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509, which necessitates doing this in a non-standard, but still portable, manner. Signed-off-by: Miguel Young de la Sota <71b8e7f4945fd97b98544cf897992af89646547a@google.com>
C
apache-2.0
lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan