Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add fullstop for the pc crowd (punctually correct). | /*
Copyright libCellML Contributors
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, softwa... | /*
Copyright libCellML Contributors
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, softwa... |
Add FCoE feature header to 82599 | /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2009 Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
ver... | |
Add documentation of the category methods on NSTimeZone | //
// NSTimeZone+Offset.h
// CocoaGit
//
// Created by Geoffrey Garside on 28/07/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Foundation/NSTimeZone.h>
@interface NSTimeZone (Offset)
+ (id)timeZoneWithStringOffset:(NSString*)offset;
- (NSString*)offsetString;
@end
| //
// NSTimeZone+Offset.h
// CocoaGit
//
// Created by Geoffrey Garside on 28/07/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Foundation/NSTimeZone.h>
@interface NSTimeZone (Offset)
/*! Creates and returns a time zone with the specified offset.
* The string is broken down into the ho... |
Apply patch by Josh Enes | // Filename: audio.h
// Created by: frang (06Jul00)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have r... | // Filename: audio.h
// Created by: frang (06Jul00)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have r... |
Use NS_ASSUME_NONNULL_BEGIN/END macros in Obj-C header | // The MIT License (MIT)
//
// Copyright (c) 2014-present James Ide
//
// 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 us... | // The MIT License (MIT)
//
// Copyright (c) 2014-present James Ide
//
// 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 us... |
Switch to Time instead of DateTime | /**
* @file WidgetTimeInput.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Aug 2016
* @brief
*
*/
#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h
#include <Blynk/BlynkApi.h>
#... | /**
* @file WidgetTimeInput.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Aug 2016
* @brief
*
*/
#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h
#include <Blynk/BlynkApi.h>
#... |
Allow us to edit this | //
// LVTFolder.h
// LayerVaultAPIClient
//
// Created by Matt Thomas on 12/4/13.
// Copyright (c) 2013 codecaffeine. All rights reserved.
//
#import <Mantle/Mantle.h>
#import "LVTColor.h"
@interface LVTFolder : MTLModel <MTLJSONSerializing>
@property (readonly, nonatomic, copy) NSString *name;
@property (nonato... | //
// LVTFolder.h
// LayerVaultAPIClient
//
// Created by Matt Thomas on 12/4/13.
// Copyright (c) 2013 codecaffeine. All rights reserved.
//
#import <Mantle/Mantle.h>
#import "LVTColor.h"
@interface LVTFolder : MTLModel <MTLJSONSerializing>
@property (readonly, nonatomic, copy) NSString *name;
@property (nonato... |
Add USB control request definitions | /*
* qiprog - Reference implementation of the QiProg protocol
*
* Copyright (C) 2013 Alexandru Gagniuc <mr.nuke.me@gmail.com>
*
* 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 ... | |
Add DIF to set pinmux insel | // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/dif/dif_pinmux.h"
#include "sw/device/lib/dif/dif_base.h"
#include "pinmux_regs.h" // Generated.
// This just exists to check that the header... | // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/dif/dif_pinmux.h"
#include "sw/device/lib/base/bitfield.h"
#include "sw/device/lib/dif/dif_base.h"
#include "pinmux_regs.h" // Generated.
// ... |
Fix for PR1567, which involves a weird bug on non-32bit architectures and silly C type sizes. | // RUN: %llvmgcc -S %s -o - -O | grep ashr
// RUN: %llvmgcc -S %s -o - -O | not grep sdiv
int test(int *A, int *B) {
return A-B;
}
| // RUN: %llvmgcc -S %s -o - -O | grep ashr
// RUN: %llvmgcc -S %s -o - -O | not grep sdiv
long long test(int *A, int *B) {
return A-B;
}
|
Add baisc test for goto | /*
name: TEST011
description: Basic test for goto
output:
F1
G1 F1 main
{
-
L2
j L3
yI #I1
L4
yI #I0
L3
L5
j L4
yI #I1
}
*/
#line 1
int
main() {
start:
goto next;
return 1;
success:
return 0;
next:
foo:
goto success;
return 1;
}
| |
Add formerly private headers to the umbrella header | @import Foundation;
#import <VENCore/VENCreateTransactionRequest.h>
#import <VENCore/VENHTTP.h>
#import <VENCore/VENHTTPResponse.h>
#import <VENCore/VENTransaction.h>
#import <VENCore/VENTransactionTarget.h>
#import <VENCore/VENUser.h>
extern NSString *const VENErrorDomainCore;
typedef NS_ENUM(NSInteger, VENCoreErro... | @import Foundation;
#import <VENCore/VENCreateTransactionRequest.h>
#import <VENCore/VENHTTP.h>
#import <VENCore/VENHTTPResponse.h>
#import <VENCore/VENTransaction.h>
#import <VENCore/VENTransactionTarget.h>
#import <VENCore/VENUser.h>
#import <VENCore/NSArray+VENCore.h>
#import <VENCore/NSDictionary+VENCore.h>
#impor... |
Test against high before palindrome check down to ~0.01 | #include "euler_util.h"
#include <string.h>
#define MAX 7
int main(int argc, char *argv[])
{
float start = timeit();
char product[MAX] = { '\0' };
int high = 0;
for (int x=100; x < 1000; x++) {
for (int y=x; y < 1000; y++) {
int canidate = x * y;
size_t int_len = ... | #include "euler_util.h"
#include <string.h>
#define MAX 7
int main(int argc, char *argv[])
{
float start = timeit();
char product[MAX] = { '\0' };
int high = 0;
for (int x=100; x < 1000; x++) {
for (int y=x; y < 1000; y++) {
int canidate = x * y;
if (canidate < hi... |
Change color of list selection to dark blue | /*
* Copyright (c) 2016 Jan Hoffmann
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#define COLOR_WINDOW_BACKGROUND GColorWhite
#define COLOR... | /*
* Copyright (c) 2016 Jan Hoffmann
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#define COLOR_WINDOW_BACKGROUND GColorWhite
#define COLOR... |
Fix alignment fault on z_bss_zero() | /*
* Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Full C support initialization
*
* Initialization of full C support: zero the .bss and call z_cstart().
*
* Stack is available in this module, but not the global data/bss until their
* ... | /*
* Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Full C support initialization
*
* Initialization of full C support: zero the .bss and call z_cstart().
*
* Stack is available in this module, but not the global data/bss until their
* ... |
Add overload for qDebug << and Eigen::Vector4f. | #ifndef SRC_EIGEN_QDEBUG_H_
#define SRC_EIGEN_QDEBUG_H_
#include <Eigen/Core>
#include <QDebug>
#include <iostream>
QDebug operator<<(QDebug dbg, const Eigen::Vector2f &vector)
{
dbg << "[" << vector.x() << "|" << vector.y() << "]";
return dbg.maybeSpace();
}
QDebug operator<<(QDebug dbg, const Eigen::Vector3f... | #ifndef SRC_EIGEN_QDEBUG_H_
#define SRC_EIGEN_QDEBUG_H_
#include <Eigen/Core>
#include <QDebug>
#include <iostream>
QDebug operator<<(QDebug dbg, const Eigen::Vector2f &vector)
{
dbg << "[" << vector.x() << "|" << vector.y() << "]";
return dbg.maybeSpace();
}
QDebug operator<<(QDebug dbg, const Eigen::Vector3f... |
Fix pointer cast into integer type. | /*
* This file is a part of Hierarchical Allocator library.
* Copyright (c) 2004-2011 Alex Pankratov. All rights reserved.
*
* http://swapped.cc/halloc
*/
/*
* The program is distributed under terms of BSD license.
* You can obtain the copy of the license by visiting:
*
* http://www.opensource.org/licenses/b... | /*
* This file is a part of Hierarchical Allocator library.
* Copyright (c) 2004-2011 Alex Pankratov. All rights reserved.
*
* http://swapped.cc/halloc
*/
/*
* The program is distributed under terms of BSD license.
* You can obtain the copy of the license by visiting:
*
* http://www.opensource.org/licenses/b... |
Update for MPICH2 1.1 on Windows | #ifndef PyMPI_CONFIG_MPICH2_H
#define PyMPI_CONFIG_MPICH2_H
#ifdef MS_WINDOWS
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_INTEGER 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_REAL 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_COMPLEX 1
#endif
#ifndef ROMIO_VERSION
#include "mpich2io.h"
#endif /* !ROMIO_VERSION */
#endif ... | #ifndef PyMPI_CONFIG_MPICH2_H
#define PyMPI_CONFIG_MPICH2_H
#ifdef MS_WINDOWS
#if !defined(MPICH2_NUMVERSION) || (MPICH2_NUMVERSION < 10100000)
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_INTEGER 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_REAL 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_COMPLEX 1
#endif /* MPICH2 < 1.1... |
Fix clash in cpp tokens | #ifndef EXPR_TOK_H
#define EXPR_TOK_H
extern expr_n tok_cur_num;
extern enum tok
{
tok_ident = -1,
tok_num = -2,
tok_eof = 0,
tok_lparen = '(',
tok_rparen = ')',
/* operators returned as char-value,
* except for double-char ops
*/
/* binary */
tok_multiply = '*',
tok_divide = '/',
tok_modulus ... | #ifndef EXPR_TOK_H
#define EXPR_TOK_H
extern expr_n tok_cur_num;
extern enum tok
{
tok_ident = -1,
tok_num = -2,
tok_eof = 0,
tok_lparen = '(',
tok_rparen = ')',
/* operators returned as char-value,
* except for double-char ops
*/
/* binary */
tok_multiply = '*',
tok_divide = '/',
tok_modulus ... |
Change access to the cwriter | //===-- llvm/Assembly/CWriter.h - C Printer for LLVM programs ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... | //===-- llvm/Assembly/CWriter.h - C Printer for LLVM programs ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... |
Add a property box field so this stuff compiles | #ifndef GNOME_PROPERTIES_H
#define GNOME_PROPERTIES_H
#include <libgnome/gnome-defs.h>
BEGIN_GNOME_DECLS
typedef struct {
GtkWidget *notebook;
GList *props;
} GnomePropertyConfigurator;
/* This is the first parameter to the callback function */
typedef enum {
GNOME_PROPERTY_READ,
GNOME_PROPERTY_WRITE,
GNOME_PR... | #ifndef GNOME_PROPERTIES_H
#define GNOME_PROPERTIES_H
#include <libgnome/gnome-defs.h>
BEGIN_GNOME_DECLS
typedef struct {
GtkWidget *notebook;
GtkWidget *property_box;
GList *props;
} GnomePropertyConfigurator;
/* This is the first parameter to the callback function */
typedef enum {
GNOME_PROPERTY_READ,
... |
Test the parse of the raw binary data seen in the hcidump integration for a manufacturer AD structure. | #include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
static int UUID_SIZE = 16;
char toHexChar(int b) {
char c;
if(b < 10)
c = '0' + b;
else
c = 'A' + b - 10;
return c;
}
int main(int argc, char **argv) {
int b = (0xa4 & 0xf0) >> 4;
printf("c0=%c, %... | |
Revert "Fix typo in the commit a5312c77." | #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];
strc... | #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];
strca... |
Update master branch version to 1.4 | //-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... | //-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... |
Include cstddef for size_t in newer GCC. | #ifndef MOLCORE_GRAPH_H
#define MOLCORE_GRAPH_H
#include "molcore.h"
#include <vector>
namespace MolCore {
class MOLCORE_EXPORT Graph
{
public:
// construction and destruction
Graph();
Graph(size_t size);
~Graph();
// properties
void setSize(size_t size);
size_t size() const;
bool isEmpty() const;
... | #ifndef MOLCORE_GRAPH_H
#define MOLCORE_GRAPH_H
#include "molcore.h"
#include <vector>
#include <cstddef>
namespace MolCore {
class MOLCORE_EXPORT Graph
{
public:
// construction and destruction
Graph();
Graph(size_t size);
~Graph();
// properties
void setSize(size_t size);
size_t size() const;
boo... |
Add configure result checks on odbc, per Peter E. | /* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/*... | /* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/*... |
Fix a warning, closing PR2452 | // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
// XFAIL: *
// See PR2452
struct {
int *name;
} syms = { L"NUL" };
| // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
#include <wchar.h>
struct {
wchar_t *name;
} syms = { L"NUL" };
|
Prepare for new lex interface | #ifndef SCANNER_H_
#define SCANNER_H_
// I want to remove this dependecy, equivalent to yy.tab.h ?
#include "parse/GENERATED/parser.hxx"
#undef yyFlexLexer // ugly hack, because <FlexLexer> is wonky
#include <FlexLexer.h>
#include <iostream>
// Tell flex how to define lexing fn
#undef YY_DECL
#define YY_DECL ... | #ifndef SCANNER_H_
#define SCANNER_H_
// I want to remove this dependecy, equivalent to yy.tab.h ?
#include "parse/GENERATED/parser.hxx"
#undef yyFlexLexer // ugly hack, because <FlexLexer> is wonky
#include <FlexLexer.h>
#include <iostream>
// Tell flex how to define lexing fn
#undef YY_DECL
#define YY_DECL ... |
Add a test to make sure that vector output happens for debug info. | // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
typedef int v4si __attribute__((__vector_size__(16)));
v4si a;
// Test that we get an array type that's also a vector out of debug.
// CHECK: [ DW_TAG_array_type ] [line 0, size 128, align 128, offset 0] [vector] [from int]
| |
Remove unwritten time library, add action library | #include <config.h>
#define LIB_BULK (USR_DIR + "/Game/lib/bulk")
#define LIB_TIME (USR_DIR + "/Game/lib/time")
#define GAME_LIB_OBJECT (USR_DIR + "/Game/lib/object")
#define BULKD (USR_DIR + "/Game/sys/bulkd")
#define SNOOPD (USR_DIR + "/Game/sys/snoopd")
#define TIMED (USR_DIR + "/Game/sys/timed")
#define ... | #include <config.h>
#define LIB_ACTION (USR_DIR + "/Game/lib/action")
#define LIB_BULK (USR_DIR + "/Game/lib/bulk")
#define GAME_LIB_OBJECT (USR_DIR + "/Game/lib/object")
#define BULKD (USR_DIR + "/Game/sys/bulkd")
#define SNOOPD (USR_DIR + "/Game/sys/snoopd")
#define TIMED (USR_DIR + "/Game/sys/timed")
#def... |
Remove unnecessary verbosity in DefaultMake | /*
* Copyright 2018-present Facebook, 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 a... | /*
* Copyright 2018-present Facebook, 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 a... |
Clean up debug header preamble. | //
// wren_debug.h
// wren
//
// Created by Bob Nystrom on 11/29/13.
// Copyright (c) 2013 Bob Nystrom. All rights reserved.
//
#ifndef wren_wren_debug_h
#define wren_wren_debug_h
#include "wren_value.h"
#include "wren_vm.h"
void wrenDebugPrintStackTrace(WrenVM* vm, ObjFiber* fiber);
int wrenDebugPrintInstructio... | #ifndef wren_debug_h
#define wren_debug_h
#include "wren_value.h"
#include "wren_vm.h"
void wrenDebugPrintStackTrace(WrenVM* vm, ObjFiber* fiber);
int wrenDebugPrintInstruction(WrenVM* vm, ObjFn* fn, int i);
void wrenDebugPrintCode(WrenVM* vm, ObjFn* fn);
void wrenDebugPrintStack(ObjFiber* fiber);
#endif
|
Increment version number to 1.54 | #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.53f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// incr... | #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.54f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// incr... |
Split the main file into .c and .h files to make breaking it up later easier. | /*
* TODO add copyright notice and GPL licence thingey
*
*
*
*/
#include <nds.h>
#include <stdio.h>
#include <time.h>
#include <dswifi9.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#define EMULATOR 1 //TODO automate flipping this in the makefile
/**
* Interactively lists WiFi connectio... | |
Fix wrong comment in configuration | //
// DZVideoPlayerViewControllerConfiguration.h
// Pods
//
// Created by Denis Zamataev on 15/07/15.
//
//
#import <Foundation/Foundation.h>
@interface DZVideoPlayerViewControllerConfiguration : NSObject
@property (assign, nonatomic) BOOL isBackgroundPlaybackEnabled; // defaults to NO
@property (strong, nonatomi... | //
// DZVideoPlayerViewControllerConfiguration.h
// Pods
//
// Created by Denis Zamataev on 15/07/15.
//
//
#import <Foundation/Foundation.h>
@interface DZVideoPlayerViewControllerConfiguration : NSObject
@property (assign, nonatomic) BOOL isBackgroundPlaybackEnabled; // defaults to YES
@property (strong, nonatom... |
Fix set_name compiler method signature | // Copyright (c) 2006- Facebook
// Distributed under the Thrift Software License
//
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
#ifndef T_ENUM_H
#define T_ENUM_H
#include "t_enum_value.h"
#include <vector>
/**
* An enumerated type. A list of constant objec... | // Copyright (c) 2006- Facebook
// Distributed under the Thrift Software License
//
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
#ifndef T_ENUM_H
#define T_ENUM_H
#include "t_enum_value.h"
#include <vector>
/**
* An enumerated type. A list of constant objec... |
Add prototype for heap_getattr() to quiet compiler | /*-------------------------------------------------------------------------
*
* heaptuple.h--
*
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: heaptuple.h,v 1.1 1996/10/18 17:58:33 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#i... | |
Add some more print statements to this test, ju... | /*
* Copyright © 2009 CNRS, INRIA, Université Bordeaux 1
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <hwloc.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
mytest_hwloc_topology_t topology;
unsigned depth;
hwloc_cpuset_t cpu_s... | /*
* Copyright © 2009 CNRS, INRIA, Université Bordeaux 1
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <hwloc.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
mytest_hwloc_topology_t topology;
unsigned depth;
hwloc_cpuset_t cpu_s... |
Add variables and reading from string. | #include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "julina.h"
int main(int argc, char **argv) {
srand(time(NULL));
double aa[] = {2, 0, 1,
-2, 3, 4,
-5, 5, 6};
Matrix *a = new_matrix(aa, 3, 3);
Matrix *ain = inverse(a);
double bb[] = {1, -1, -2... | #include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "julina.h"
#define VARIABLE_START 'A'
#define VARIABLE_COUNT 26
static Matrix *variables[VARIABLE_COUNT];
Matrix *get_variable(int c) {
if (c < 0 || c >= VARIABLE_COUNT) {
return NULL;
}
return variables[c - VARIABLE_START];
}
// R... |
Add comment about "reserved" -1 value | #ifndef __LIBCT_ERRORS_H__
#define __LIBCT_ERRORS_H__
/*
* This file contains errors, that can be returned from various
* library calls
*/
/* Generic */
#define LCTERR_BADCTSTATE -2 /* Bad container state */
#define LCTERR_BADFSTYPE -3 /* Bad FS type */
#define LCTERR_BADNETTYPE -4 /* Bad Net type */
#define LCTERR... | #ifndef __LIBCT_ERRORS_H__
#define __LIBCT_ERRORS_H__
/*
* This file contains errors, that can be returned from various
* library calls
*/
/*
* -1 is "reserved" for generic "something went wrong" result
* since this value can be (well, is) widely explicitly used
* all over the code.
*/
/* Generic */
#define LC... |
Fix 'HTML start tag prematurely ended' warning | @import Foundation;
NS_ASSUME_NONNULL_BEGIN
/// Allows you to customize the style for the the view
/// controllers for your libraries.
@interface CPDStyle : NSObject
/// HTML provided to the view controller, it's nothing too fancy
/// just a string which has a collection of string replacements on it.
///
/// This i... | @import Foundation;
NS_ASSUME_NONNULL_BEGIN
/// Allows you to customize the style for the the view
/// controllers for your libraries.
@interface CPDStyle : NSObject
/// HTML provided to the view controller, it's nothing too fancy
/// just a string which has a collection of string replacements on it.
///
/// This i... |
Fix include guard conflicting with the class name | /*
#
# ST_HW_HC_SR04.h
#
# (C)2016-2017 Flávio monteiro
#
# 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 ... | /*
#
# ST_HW_HC_SR04.h
#
# (C)2016-2017 Flávio monteiro
#
# 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 ... |
Add AC_BITS to convert a bit number 0..N-1 to a mask. | /*
* Copyright 2015 Wink Saville
*
* 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... | |
Change votes to use double. | #ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
float votes;
};
class Proposer {
public:
... | #ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
double votes;
};
class Proposer {
public:... |
Add the blink effect to the GPIO demo | #include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void delay(uint32_t count)
{
while(count--);
}
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OType_PP,... | #include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void delay(uint32_t count)
{
while(count--);
}
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OType_PP,... |
Disable THERMAL_DATA_UART by default. This is a big CPU sink, and is a pretty non-standard config. | #ifndef _PROJECT_CONFIG_H_
#define _PROJECT_CONFIG_H_
#ifdef USART_DEBUG // this happens by 'make USART_DEBUG=1'
#undef THERMAL_DATA_UART
#else
#define USART_DEBUG
#define THERMAL_DATA_UART
#endif
#define TMP007_OVERLAY
#define SPLASHSCREEN_OVERLAY
#define ENABLE_LEPTON_AGC
// #define Y16
#ifndef Y16
// Values from L... | #ifndef _PROJECT_CONFIG_H_
#define _PROJECT_CONFIG_H_
#ifdef USART_DEBUG // this happens by 'make USART_DEBUG=1'
#undef THERMAL_DATA_UART
#else
#define USART_DEBUG
// #define THERMAL_DATA_UART
#endif
#define TMP007_OVERLAY
#define SPLASHSCREEN_OVERLAY
#define ENABLE_LEPTON_AGC
// #define Y16
#ifndef Y16
// Values fro... |
Revert "sys_clock: start the microkernel ticker in the MICROKERNEL init level" | /*
* Copyright (c) 2015 Wind River Systems, 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 ... | /*
* Copyright (c) 2015 Wind River Systems, 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 ... |
Add constexpr version of maximum to algorithm | //===--- Algorithm.h - ------------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... | //===--- Algorithm.h - ------------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
Update pixel format type for CoreVideo Scaled YCoCg DXT5 to match change in codec | //
// VPUSupport.h
// QTMultiGPUTextureIssue
//
// Created by Tom Butterworth on 15/05/2012.
// Copyright (c) 2012 Tom Butterworth. All rights reserved.
//
#ifndef QTMultiGPUTextureIssue_VPUSupport_h
#define QTMultiGPUTextureIssue_VPUSupport_h
#import <Foundation/Foundation.h>
#import <QTKit/QTKit.h>
#define kVP... | //
// VPUSupport.h
// QTMultiGPUTextureIssue
//
// Created by Tom Butterworth on 15/05/2012.
// Copyright (c) 2012 Tom Butterworth. All rights reserved.
//
#ifndef QTMultiGPUTextureIssue_VPUSupport_h
#define QTMultiGPUTextureIssue_VPUSupport_h
#import <Foundation/Foundation.h>
#import <QTKit/QTKit.h>
#define kVP... |
Add beginnings of events on hardware | #include <stdio.h>
#include "event_service.h"
#include "touchscreen.h"
#include "device.h"
typedef struct event {
int32_t device;
int16_t val;
// union here for other events like keys
} event;
#define INPUT_QUEUE_SIZE 128
static event input_queue[INPUT_QUEUE_SIZE];
// The next time that needs to be read:
... | |
Fix a -Wdocumentation warning (empty paragraph passed to '\brief' command) | //===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
Fix warning (struct forward-declared as class). | #ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
class SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkEdge** ... | #ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
struct SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkEdge**... |
Use nullptr to stay Qt4 compatible. | #ifndef CLICKLABEL_H
#define CLICKLABEL_H
#include <QLabel>
#include <QWidget>
#include <Qt>
class ClickLabel:public QLabel
{
Q_OBJECT
public:
explicit ClickLabel(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
~ClickLabel();
signals:
void clicked();
protected:
void mouseRelea... | #ifndef CLICKLABEL_H
#define CLICKLABEL_H
#include <QLabel>
#include <QWidget>
#include <Qt>
class ClickLabel:public QLabel
{
Q_OBJECT
public:
explicit ClickLabel(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~ClickLabel();
signals:
void clicked();
protected:
void mouseRelease... |
Use the C library version of log10() instead of the inaccurate formula log10(x) = log10e * log(x). This fixes some small (one or two ULP) inaccuracies. | #include "f2c.h"
#define log10e 0.43429448190325182765
#ifdef KR_headers
double log();
double d_lg10(x) doublereal *x;
#else
#undef abs
#include "math.h"
double d_lg10(doublereal *x)
#endif
{
return( log10e * log(*x) );
}
| #include "f2c.h"
#ifdef KR_headers
double log10();
double d_lg10(x) doublereal *x;
#else
#undef abs
#include "math.h"
double d_lg10(doublereal *x)
#endif
{
return( log10(*x) );
}
|
Add missing legacy API into legacy header | /**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
... | /**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
... |
Fix typo in include guard | /*
Copyright (C) 2016 Volker Krause <vkrause@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later versio... | /*
Copyright (C) 2016 Volker Krause <vkrause@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later versio... |
Change for alpha-RC1 version name | #ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "APM P... | #ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "APM P... |
Include marcdisp.h so that atoi_n gets public on WIN32 | /*
* Copyright (c) 1997-2004, Index Data
* See the file LICENSE for details.
*
* $Id: atoin.c,v 1.4 2004-12-13 14:21:55 heikki Exp $
*/
/**
* \file atoin.c
* \brief Implements atoi_n function.
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h>
#include <ctype.h>
/**
* atoi_n: like atoi b... | /*
* Copyright (c) 1997-2004, Index Data
* See the file LICENSE for details.
*
* $Id: atoin.c,v 1.5 2004-12-16 08:59:56 adam Exp $
*/
/**
* \file atoin.c
* \brief Implements atoi_n function.
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h>
#include <ctype.h>
#include <yaz/marcdisp.h>
/**... |
Add conversion-to-bool operator to JsonRpcResult class | #pragma once
#include "jcon.h"
#include <QString>
#include <QVariant>
namespace jcon {
class JCON_API JsonRpcResult
{
public:
virtual ~JsonRpcResult() {}
virtual bool isSuccess() const = 0;
virtual QVariant result() const = 0;
virtual QString toString() const = 0;
};
}
| #pragma once
#include "jcon.h"
#include <QString>
#include <QVariant>
namespace jcon {
class JCON_API JsonRpcResult
{
public:
virtual ~JsonRpcResult() {}
operator bool() const { return isSuccess(); }
virtual bool isSuccess() const = 0;
virtual QVariant result() const = 0;
virtual QString toStr... |
Support DEC style PARAMETER statements | #include "../parse.h"
unsigned parse_stmt_parameter(
const sparse_t* src, const char* ptr,
parse_debug_t* debug,
parse_stmt_t* stmt)
{
unsigned dpos = parse_debug_position(debug);
unsigned i = parse_keyword(
src, ptr, debug,
PARSE_KEYWORD_PARAMETER);
if (i == 0) return 0;
if (ptr[i++] != '(')
{
parse_... | #include "../parse.h"
unsigned parse_stmt_parameter(
const sparse_t* src, const char* ptr,
parse_debug_t* debug,
parse_stmt_t* stmt)
{
unsigned dpos = parse_debug_position(debug);
unsigned i = parse_keyword(
src, ptr, debug,
PARSE_KEYWORD_PARAMETER);
if (i == 0) return 0;
bool has_brackets = (ptr[i] == '... |
Remove debug messages and duplicate code | #include <arch/x64/port.h>
#include <truth/panic.h>
#define TEST_RESULT_PORT_NUMBER 0xf4
void test_shutdown_status(enum status status) {
logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status);
write_port(status, TEST_RESULT_PORT_NUMBER);
//__asm__("movb $0x0, %al; outb %a... | #include <arch/x64/port.h>
#include <truth/panic.h>
#define TEST_RESULT_PORT_NUMBER 0xf4
void test_shutdown_status(enum status status) {
logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status);
write_port(status, TEST_RESULT_PORT_NUMBER);
halt();
assert(Not_Reached)... |
Fix file name in comments. | /*===---- stddef.h - Basic type definitions --------------------------------===
*
* 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 rig... | /*===---- cpuid.h - Basic type definitions ---------------------------------===
*
* 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 rig... |
Move this class back to onebusaway-iphone | @interface OBABookmarkV2 : NSObject {
NSString * _name;
NSArray * _stopIds;
}
- (id) initWithCoder:(NSCoder*)coder;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSArray * stopIds;
@end
| |
Change stubs for VDP1 cons driver | /*
* Copyright (c) 2012 Israel Jacques
* See LICENSE for details.
*
* Israel Jacques <mrko@eecs.berkeley.edu>
*/
#include "cons.h"
typedef struct {
} cons_vdp1_t;
static struct cons_vdp1_t *cons_vdp1_new(void);
static void cons_vdp1_write(struct cons *, int, uint8_t, uint8_t);
void
cons_vdp1_init(struct cons *... | /*
* Copyright (c) 2012 Israel Jacques
* See LICENSE for details.
*
* Israel Jacques <mrko@eecs.berkeley.edu>
*/
#include <inttypes.h>
#include <stdbool.h>
#include <ctype.h>
#include <string.h>
#include "cons.h"
typedef struct {
} cons_vdp1_t;
static cons_vdp1_t *cons_vdp1_new(void);
static void cons_vdp1_res... |
Add "clear" command for clearing screen | #include <norby/colortest.h>
#include <norby/gdt.h>
#include <norby/idt.h>
#include <norby/irq.h>
#include <norby/isrs.h>
#include <norby/kernel.h>
#include <norby/keyboard.h>
#include <norby/panic.h>
#include <norby/version.h>
#include <norby/vga.h>
#include <stdio.h>
#include <string.h>
void kmain() {
//Install des... | #include <norby/colortest.h>
#include <norby/gdt.h>
#include <norby/idt.h>
#include <norby/irq.h>
#include <norby/isrs.h>
#include <norby/kernel.h>
#include <norby/keyboard.h>
#include <norby/panic.h>
#include <norby/version.h>
#include <norby/vga.h>
#include <stdio.h>
#include <string.h>
void kmain() {
//Install des... |
Fix test case RUN: line (thanks Argiris) | // RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1
// RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
int foo(void) {
}
| // RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1 &&
// RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
int foo(void) {
}
|
Update internal glibc functions ABI for glibc 2.27 | /*
* nsswitch_internal.h
* Prototypes for some internal glibc functions that we use. Shhh.
*/
#ifndef NSSWITCH_INTERNAL_H
#define NSSWITCH_INTERNAL_H
#include "config.h"
/* glibc/config.h.in */
#if defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__
# define internal_function __attribute__ ((r... | /*
* nsswitch_internal.h
* Prototypes for some internal glibc functions that we use. Shhh.
*/
#ifndef NSSWITCH_INTERNAL_H
#define NSSWITCH_INTERNAL_H
#include <features.h>
#include "config.h"
/* glibc/config.h.in */
#if __GLIBC_PREREQ(2, 27)
# define internal_function
#elif defined USE_REGPARMS && !defined PROF ... |
Change from `int` to `float` | #include <stdio.h>
/* print Fahrenheit to Celsius table
* for Fahrenheit 0, 20, ..., 300 */
int main()
{
int fahr;
int cel;
int lower;
int upper;
int step;
lower = 0; /* lower bound for the table */
upper = 300; /* upper bound for the table */
step = 20; /* amount to step by */
... | #include <stdio.h>
/* print Fahrenheit to Celsius table
* for Fahrenheit 0, 20, ..., 300 */
int main()
{
float fahr;
float cel;
int lower;
int upper;
int step;
lower = 0; /* lower bound for the table */
upper = 300; /* upper bound for the table */
step = 20; /* amount to step by */
... |
Make os::GLContext instantiable (isValid() returns false by default) | // LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_INCLUDED
#define OS_GL_CONTEXT_INCLUDED
#pragma once
namespace os {
class GLContext {
pu... | // LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_INCLUDED
#define OS_GL_CONTEXT_INCLUDED
#pragma once
namespace os {
class GLContext {
pu... |
Use bytes for mask images | /*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_SCORING_SCORE_MASK_H
#define VISTK_SCORING_SCORE_MASK_H
#include "scoring-conf... | /*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_SCORING_SCORE_MASK_H
#define VISTK_SCORING_SCORE_MASK_H
#include "scoring-conf... |
Create an enum for all posible function return status codes | #ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
#endif | #ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
enum STATUS_CODE
{
// General
GENERAL_SUCCESS,
GENERAL_FAILURE
}
#endif |
Enable error logging for the blackbox reader | /*
* Copyright (C) 2012 Andrew Beekhof <andrew@beekhof.net>
*
* libqb 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.
*... | /*
* Copyright (C) 2012 Andrew Beekhof <andrew@beekhof.net>
*
* libqb 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.
*... |
Fix incorrect import on React-Native >=0.40 | //
// RNCallKit.h
// RNCallKit
//
// Created by Ian Yu-Hsun Lin on 12/22/16.
// Copyright © 2016 Ian Yu-Hsun Lin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CallKit/CallKit.h>
#import <Intents/Intents.h>
//#import <AVFoundation/AVAudioSession.h>
#import "RCTEventEmi... | //
// RNCallKit.h
// RNCallKit
//
// Created by Ian Yu-Hsun Lin on 12/22/16.
// Copyright © 2016 Ian Yu-Hsun Lin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CallKit/CallKit.h>
#import <Intents/Intents.h>
//#import <AVFoundation/AVAudioSession.h>
#import <React/RCTEv... |
Add an ifdef to disable MallocCache for debugging. | #ifndef MALLOCCACHE_H
#define MALLOCCACHE_H
template <size_t blockSize, size_t blockCount>
class MallocCache
{
public:
MallocCache()
: m_blocksCached(0)
{
}
~MallocCache()
{
assert(m_blocksCached >= 0 && m_blocksCached <= blockCount);
for (size_t i = 0; i < m_blocksCached; i... | #ifndef MALLOCCACHE_H
#define MALLOCCACHE_H
// no-op the cache, sometimes useful for debugging memory issues
//#define MALLOCCACHE_PASSTHROUGH
template <size_t blockSize, size_t blockCount>
class MallocCache
{
public:
MallocCache()
: m_blocksCached(0)
{
}
~MallocCache()
{
#ifndef MALLOCCAC... |
Handle input by the user |
#pragma once
#include "Component.h"
enum ENTITY_TYPE {PLAYER};
// Commnets
class InputComponent :
public Component
{
public:
InputComponent();
~InputComponent();
void SetEntityType(int entityType);
void HandleInput();
void HandlePlayerInput();
private:
char* m_inputMessage;
ENTITY_TYPE m_entityType;
... | |
Add warning in function documentation | #ifndef SC_ADB_PARSER_H
#define SC_ADB_PARSER_H
#include "common.h"
#include "stddef.h"
/**
* Parse the ip from the output of `adb shell ip route`
*/
char *
sc_adb_parse_device_ip_from_output(char *buf, size_t buf_len);
#endif
| #ifndef SC_ADB_PARSER_H
#define SC_ADB_PARSER_H
#include "common.h"
#include "stddef.h"
/**
* Parse the ip from the output of `adb shell ip route`
*
* Warning: this function modifies the buffer for optimization purposes.
*/
char *
sc_adb_parse_device_ip_from_output(char *buf, size_t buf_len);
#endif
|
Change more info window layout name | startclose: moreInfo
New Window [ Name: "More Info"; Left: Get ( WindowDesktopWidth ) - (Get ( WindowDesktopWidth ) / 2 ) ]
Go to Layout [ “about” (tempSetup) ]
Adjust Window
[ Resize to Fit ]
Pause/Resume Script [ Indefinitely ]
January 23, 平成26 3:39:22 Imagination Quality Management.fp7 - about -1-
| startclose: moreInfo
New Window [ Name: "More Info"; Left: Get ( WindowDesktopWidth ) - (Get ( WindowDesktopWidth ) / 2 ) ]
Go to Layout [ “moreinfo” (tempSetup) ]
Adjust Window
[ Resize to Fit ]
Pause/Resume Script [ Indefinitely ]
January 23, 平成26 3:39:22 Imagination Quality Management.fp7 - about -1-
|
Add in a version number so apps can tell uclib is being used. -Erik |
#ifndef __FEATURES_H
#define __FEATURES_H
#ifdef __STDC__
#define __P(x) x
#define __const const
/* Almost ansi */
#if __STDC__ != 1
#define const
#define volatile
#endif
#else /* K&R */
#define __P(x) ()
#define __const
#define const
#define volatile
#endif
/* No C++ */
#define __BEGIN_DECLS
#define __END_DECL... |
#ifndef __FEATURES_H
#define __FEATURES_H
/* Major and minor version number of the uCLibc library package. Use
these macros to test for features in specific releases. */
#define __UCLIBC__ 0
#define __UCLIBC_MAJOR__ 9
#define __UCLIBC_MINOR__ 1
#ifdef __STDC__
#define __P(x) x
#define __const const
/* Almo... |
Fix on fbsd amd64 where U32 is 4 bytes and pthread_t is 8. | /* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... | /* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... |
Fix test. (0 && (a(),1)) is a valid I-C-E according to C99. | // RUN: clang %s -fsyntax-only -verify -pedantic-errors
int a() {int p; *(1 ? &p : (void*)(0 && (a(),1))) = 10;} // expected-error {{null pointer expression is not an integer constant expression (but is allowed as an extension)}} // expected-note{{C does not permit evaluated commas in an integer constant expression}}
| // RUN: clang %s -fsyntax-only -verify
int a() {int p; *(1 ? &p : (void*)(0 && (a(),1))) = 10;}
|
Fix macro so it can be used as a statement | #ifdef E_TYPEDEFS
#define e_error_message_show(args...) \
{ \
char __tmpbuf[PATH_MAX]; \
\
snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
e_error_message_show_internal(__tmpbuf); \
}
#else
#ifndef E_ERROR_H
#define E_ERROR_H
EAPI void e_error_message_show_internal(char *txt);
#endif
#endif
| #ifdef E_TYPEDEFS
#define e_error_message_show(args...) do \
{ \
char __tmpbuf[PATH_MAX]; \
\
snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
e_error_message_show_internal(__tmpbuf); \
} while (0)
#else
#ifndef E_ERROR_H
#define E_ERROR_H
EAPI void e_error_message_show_internal(char *txt);
#endif
#endif... |
Fix build with strndup on some platforms | #ifndef UTIL_STRING_H
#define UTIL_STRING_H
#include "util/common.h"
char* strndup(const char* start, size_t len);
char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
#endif
| #ifndef UTIL_STRING_H
#define UTIL_STRING_H
#include "util/common.h"
#ifndef strndup
// This is sometimes a macro
char* strndup(const char* start, size_t len);
#endif
char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
#endif
|
Update import statement for consistency. | #import "MBProgressHUD.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "JTSImageViewController.h"
#import "JTSImageInfo.h"
#import "UITabBarController+NBUAdditions.h"
#import "KINWebBrowserViewController.h"
#import <SSPullToRefresh/SSPullToRefresh.h>
#import "SVGKit/SVGKit.h"
| #import "MBProgressHUD.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "JTSImageViewController.h"
#import "JTSImageInfo.h"
#import "UITabBarController+NBUAdditions.h"
#import "KINWebBrowserViewController.h"
#import <SSPullToRefresh/SSPullToRefresh.h>
#import <SVGKit/SVGKit.h>
|
Add validation to fuzz target | #define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_result res = cgltf_parse(&options, Data, Size, &data);
if (res == cgltf_result_success) cgltf_free(data);
return 0;
}
| #define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_result res = cgltf_parse(&options, Data, Size, &data);
if (res == cgltf_result_success)
{
cgltf_validate(data);
cgltf_free(data);
}
re... |
Bump version in preparation for next release. | /** \file common.h
* \brief Project-wide definitions and macros.
*
*
* SCL; 2012-2015
*/
#ifndef COMMON_H
#define COMMON_H
#define GR1C_VERSION "0.10.2"
#define GR1C_COPYRIGHT "Copyright (c) 2012-2015 by Scott C. Livingston,\n" \
"California Institute of Technology\n\n" \
"This is free, open source software,... | /** \file common.h
* \brief Project-wide definitions and macros.
*
*
* SCL; 2012-2015
*/
#ifndef COMMON_H
#define COMMON_H
#define GR1C_VERSION "0.10.3"
#define GR1C_COPYRIGHT "Copyright (c) 2012-2015 by Scott C. Livingston,\n" \
"California Institute of Technology\n\n" \
"This is free, open source software,... |
Remove old class forward declaration | //
// OCTEntity.h
// OctoKit
//
// Created by Josh Abernathy on 1/21/11.
// Copyright 2011 GitHub. All rights reserved.
//
#import "OCTObject.h"
@class OCTPlan;
@class GHImageRequestOperation;
// Represents any GitHub object which is capable of owning repositories.
@interface OCTEntity : OCTObject
// Returns `l... | //
// OCTEntity.h
// OctoKit
//
// Created by Josh Abernathy on 1/21/11.
// Copyright 2011 GitHub. All rights reserved.
//
#import "OCTObject.h"
@class OCTPlan;
// Represents any GitHub object which is capable of owning repositories.
@interface OCTEntity : OCTObject
// Returns `login` if no name is explicitly s... |
Rework the command line option defaults mechanism | #include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "options.h"
static Options *
_new() {
Options *opts = (Options *)malloc(sizeof(Options));
if(opts) {
memset(opts, 0, sizeof(Options));
}
return opts;
}
static Options *
make(int argc, char *argv[]) {
Options *opts = _new();
int i = 1;
fo... | #include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "options.h"
static Options *
_new() {
Options *opts = (Options *)malloc(sizeof(Options));
if(opts) {
memset(opts, 0, sizeof(Options));
}
return opts;
}
static Options *
make(int argc, char *argv[]) {
Options *opts = _new();
int i = 1;
/*... |
Comment the main .c file | #include <stdio.h>
int main()
{
puts("Hello, people!");
return 0;
}
| #include <stdio.h>
int main()
{
puts("Hello, people!"); /* Preferred over printf */
return 0;
}
|
Mend loop condition from 344aae0 | #define _XOPEN_SOURCE 500
#include <unistd.h>
#include <stdlib.h>
char *os_find_self(void)
{
// PATH_MAX (used by readlink(2)) is not necessarily available
size_t size = 2048, used = 0;
char *path = NULL;
do {
size *= 2;
path = realloc(path, size);
used = readlink("/proc/self/ex... | #define _XOPEN_SOURCE 500
#include <unistd.h>
#include <stdlib.h>
char *os_find_self(void)
{
// PATH_MAX (used by readlink(2)) is not necessarily available
size_t size = 2048, used = 0;
char *path = NULL;
do {
size *= 2;
path = realloc(path, size);
used = readlink("/proc/self/ex... |
Add placeholder C code to finish build scripts | /**
* Copyright (c) 2011 Jon Maken, All Rights Reserved
* License: 3-Clause BSD
* Revision: 07/21/2011 2:44:32 PM
*/
#include <stdio.h>
static void usage(void)
{
printf("XVal: Validate XML documents\n");
printf("Usage: xval [--dtd DTD_FILE | --xsd XSD_FILE] XML_FILE ...\n\n");
printf(" --dtd DTD_FILE validate... | |
Add dummy macro GC_register_finalizer_ignore_self and GC_add_roots. | /* $Id: t_gc.h,v 1.7 2011/09/04 13:00:54 mit-sato Exp $ */
#ifndef __T_GC__
#define __T_GC__
#ifdef PROF
# define GC_INIT() 0
# define GC_MALLOC(s) malloc(s)
# define GC_MALLOC_ATOMIC(s) malloc(s)
#else
# include <gc.h>
#endif /* PROF */
#endif /* __T_GC__ */
| /* $Id: t_gc.h,v 1.7 2011/09/04 13:00:54 mit-sato Exp $ */
#ifndef __T_GC__
#define __T_GC__
#ifdef PROF
# define GC_INIT() 0
# define GC_MALLOC(s) malloc(s)
# define GC_MALLOC_ATOMIC(s) malloc(s)
# define GC_register_finalizer_ignore_self(o,f,c,x,y) 0
# define GC_add_roots(s,e) 0
#else
# include <gc.h>... |
Allow nil result in kit api attribution method | #import <Foundation/Foundation.h>
@class MPAttributionResult;
@class FilteredMParticleUser;
@protocol MPKitProtocol;
@interface MPKitAPI : NSObject
- (void)logError:(NSString *_Nullable)format, ...;
- (void)logWarning:(NSString *_Nullable)format, ...;
- (void)logDebug:(NSString *_Nullable)format, ...;
- (void)logVer... | #import <Foundation/Foundation.h>
@class MPAttributionResult;
@class FilteredMParticleUser;
@protocol MPKitProtocol;
@interface MPKitAPI : NSObject
- (void)logError:(NSString *_Nullable)format, ...;
- (void)logWarning:(NSString *_Nullable)format, ...;
- (void)logDebug:(NSString *_Nullable)format, ...;
- (void)logVer... |
Change default F_CPU from 12000000 to 8000000 | /*
* USART.h
*
* Created: 2016/9/10 16:30:30
* Author: dusch
*/
#ifndef USART_H_
#define USART_H_
#define BAUD 9600
#define F_CPU 12000000UL
#include <avr/interrupt.h>
void USART_Init(void);
void USART_Transmit(unsigned char data);
unsigned char USART_Receive(void);
#endif /* USART_H_... | /*
* USART.h
*
* Created: 2016/9/10 16:30:30
* Author: dusch
*/
#ifndef USART_H_
#define USART_H_
#define BAUD 9600
#define F_CPU 8000000UL
#include <avr/interrupt.h>
void USART_Init(void);
void USART_Transmit(unsigned char data);
unsigned char USART_Receive(void);
#endif /* USART_H_ ... |
Add a header file for osl::Move | #include "ruby.h"
#include <osl/move.h>
extern VALUE cMove;
using namespace osl;
void rb_move_free(Move* ptr);
static VALUE rb_move_s_new(VALUE self);
void Init_move(void);
| |
Fix typo in writable string test | // RUN: clang -emit-llvm -fwritable-string %s
int main() {
char *str = "abc";
str[0] = '1';
printf("%s", str);
}
| // RUN: clang -emit-llvm -fwritable-strings %s
int main() {
char *str = "abc";
str[0] = '1';
printf("%s", str);
}
|
Make TRACE() safe when DEBUG is disabled. | #ifndef _TRACE_H_
#define _TRACE_H_
#include <stdio.h>
#include <errno.h>
#ifdef DEBUG
#define TRACE ERROR
#else
#define TRACE(fmt,arg...) ((void) 0)
#endif
#ifdef DEBUG
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s:%d: "fmt, __func__, __LINE__, ##arg)
#else
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s: "fmt... | #ifndef _TRACE_H_
#define _TRACE_H_
#include <stdio.h>
#include <errno.h>
#ifdef DEBUG
#define TRACE ERROR
#else
static inline void TRACE(const char *fmt, ...) { }
#endif
#ifdef DEBUG
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s:%d: "fmt, __func__, __LINE__, ##arg)
#else
#define ERROR(fmt,arg...) \
fprintf(std... |
Use EXPECTED/EXPECTED_LENGTH/OUTPUT_SIZE macros in the atom encoding test. | #include <bert/encoder.h>
#include <bert/magic.h>
#include <bert/errno.h>
#include "test.h"
#include <string.h>
unsigned char output[6];
void test_output()
{
if (output[0] != BERT_MAGIC)
{
test_fail("bert_encoder_push did not add the magic byte");
}
if (output[1] != BERT_ATOM)
{
test_fail("bert_encoder_pus... | #include <bert/encoder.h>
#include <bert/magic.h>
#include <bert/errno.h>
#include "test.h"
#include <string.h>
#define EXPECTED_LENGTH 2
#define EXPECTED "id"
#define OUTPUT_SIZE (1 + 1 + 2 + EXPECTED_LENGTH)
unsigned char output[OUTPUT_SIZE];
void test_output()
{
if (output[0] != BERT_MAGIC)
{
test_fail("bert... |
Implement add_contant to draw function | //Finished just draw_new function, Sleeping zzZZ
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define LENLINE 255
//global variable assignment
struct node {
char string[LENLINE];
struct node *next; //next and previous address node linked
};
int line_amount = 0;
int draw_new(char *name, int socket,s... | |
Add simple constructor and destructor. | #include <stdint.h>
#include <stdlib.h>
#include "rtpp_module.h"
#define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
struct moduleinfo rtpp_module = {
.name = "csv_acct",
.ver = MI_VER_INIT(struct moduleinfo)
};
| #include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include "rtpp_types.h"
#include "rtpp_module.h"
#define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
struct rtpp_module_priv {
int foo;
};
static struct rtpp_module_priv *rtpp_csv_acct_ctor(struct rtpp_cfg_stable *);
static... |
Add Perry Metzger's wrapper to run the svnserve process setgid, since this can be very helpful to svn+ssh users. Quoting from the comments: | /*
* Wrapper to run the svnserve process setgid.
* The idea is to avoid the problem that some interpreters like bash
* invoked by svnserve in hook scripts will reset the effective gid to
* the real gid, nuking the effect of an ordinary setgid svnserve binary.
* Sadly, to set the real gid portably, you need to be r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.