commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
63aed9a9b6c82e1c9114784721c9a2edff7d0e68 | ch1/ex3/farh_to_celsius_v2.c | ch1/ex3/farh_to_celsius_v2.c | #include <stdio.h>
float K_5_BY_9 = 5.0 / 9.0;
float K_32 = 32;
int main(void)
{
float fahr, celsius;
int lower, upper, step;
lower = 0;
upper = 300;
step = 20;
printf("|-----------|\n");
printf("|%4s|%6s|\n", "F", "C");
printf("|-----------|\n");
fahr = lower;
while (... | #include <stdio.h>
float K_5_BY_9 = 5.0 / 9.0;
float K_32 = 32;
int SUCCESS = 0;
int main(void)
{
float fahrenheit, celsius;
int lower, upper, step;
lower = 0;
upper = 300;
step = 20;
printf("|-----------|\n");
printf("|%4s|%6s|\n", "F", "C");
printf("|-----------|\n");
f... | Update ch1/ex3 v2 exercise with more readable code | Update ch1/ex3 v2 exercise with more readable code
| C | bsd-3-clause | rmk135/the-c-programming-language |
21465b20594432e4d73b5eaa75e34ef00761face | subversion/libsvn_fs/txn.h | subversion/libsvn_fs/txn.h | /* node.h : interface to node functions, private to libsvn_fs
*
* ====================================================================
* Copyright (c) 2000 CollabNet. All rights reserved.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution... | /* txn.h : interface to Subversion transactions, private to libsvn_fs
*
* ====================================================================
* Copyright (c) 2000 CollabNet. All rights reserved.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this dist... | Fix descriptive comment at top of file. | Fix descriptive comment at top of file.
| C | apache-2.0 | jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion |
8a6513105010a0e334ccf8cf3f4c017abf2b44ae | src/sail/game_struct.h | src/sail/game_struct.h | /*
* Copyright (C) 2015 Luke San Antonio
* All rights reserved.
*/
#pragma once
#include "../common/id_map.hpp"
#include "boat.h"
#include "../collisionlib/motion.h"
namespace redc { namespace sail
{
struct Player
{
std::string name;
bool spawned;
Hull_Desc boat_config;
collis::Motion boat_motio... | /*
* Copyright (C) 2015 Luke San Antonio
* All rights reserved.
*/
#pragma once
#include "../common/id_map.hpp"
#include "boat.h"
#include "../collisionlib/motion.h"
namespace redc { namespace sail
{
struct Player
{
std::string name;
bool spawned;
Hull_Desc boat_config;
collis::Motion boat_motio... | Add user data to Game struct | Add user data to Game struct
| C | bsd-3-clause | RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine |
e084ce3506c805a4667aa2d32ef249c5754244cc | ext/libxml/ruby_xml_state.c | ext/libxml/ruby_xml_state.c | /* $Id$ */
#include "ruby_libxml.h"
VALUE cXMLState;
VALUE LIBXML_STATE = Qnil;
static int dummy = 0;
void
ruby_xml_state_free(int dummy) {
xmlCleanupParser();
LIBXML_STATE = Qnil;
}
VALUE
ruby_xml_state_alloc() {
#ifdef DEBUG
fprintf(stderr, "Allocating state");
#endif
xmlInitParser();
return... | /* $Id$ */
#include "ruby_libxml.h"
VALUE cXMLState;
VALUE LIBXML_STATE = Qnil;
static int dummy = 0;
void
ruby_xml_state_free(int dummy) {
xmlCleanupParser();
LIBXML_STATE = Qnil;
}
VALUE
ruby_xml_state_alloc(VALUE klass) {
#ifdef DEBUG
fprintf(stderr, "Allocating state");
#endif
xmlInitParser();
... | Fix declaration of alloc function. | Fix declaration of alloc function.
| C | mit | sferik/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,sferik/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,increments/libxml-ruby |
e481844fb1bada30eff2e2b17fe0e1a7d933bbfa | src/mikpeer.c | src/mikpeer.c | #include <miknet/miknet.h>
int mikpeer (miknode_t *n)
{
int sock, i, pos = 0;
struct sockaddr_storage addr;
socklen_t addrlen;
sock = accept(n->tcp, (struct sockaddr *)&addr, &addrlen);
if (sock < 0)
return mik_debug(ERR_SOCKET);
if (n->peerc >= n->peermax) {
close(sock);
return ERR_PEER_MAX;
}
n->pee... | Create a constructor and deconstructor for the peer structure. | Create a constructor and deconstructor for the peer structure.
Peers are created over the SOCK_STREAM socket, and so that is preferred.
The array which holds all the peers of a node, node.peers, determines whether
a slot is empty or occupied by the state of the peer. MIK_CONN is active, and
MIK_DISC is an empty slot.
| C | mit | PaytonTurnage/Miknet,turnage/Miknet | |
733710b2daccb85fb0e48a0a4dd98ca10f6e6c9d | src/keyimpl.h | src/keyimpl.h | #pragma once
#include "jwtxx/jwt.h"
#include <string>
namespace JWTXX
{
struct Key::Impl
{
virtual std::string sign(const void* data, size_t size) const = 0;
virtual bool verify(const void* data, size_t size, const std::string& signature) const = 0;
};
}
| #pragma once
#include "jwtxx/jwt.h"
#include <string>
namespace JWTXX
{
struct Key::Impl
{
virtual ~Impl() {}
virtual std::string sign(const void* data, size_t size) const = 0;
virtual bool verify(const void* data, size_t size, const std::string& signature) const = 0;
};
}
| Fix memory leak in key implementations. | Fix memory leak in key implementations.
| C | mit | RealImage/jwtxx,RealImage/jwtxx,madf/jwtxx,madf/jwtxx |
0616049f570ad86c7d9e4064029d1340f32a4763 | src/logging.h | src/logging.h | #pragma once
#include <cstdio>
namespace happyntrain {
#define LOG(message, level, ...) \
printf("[" level "] %s-%d " message "\n", __FILE__, __LINE__, ##__VA_ARGS__);
#define INFO(message, ...) LOG(message, "INFO", ##__VA_ARGS__);
#define DEBUG(message, ...) LOG(message, "DEBUG", ##__VA_ARGS__);
#define ERROR(mes... | #pragma once
#include <cstdio>
namespace happyntrain {
#define LOG(message, level, ...) \
printf("[%5s] %s-%d " message "\n", level, __FILENAME__, __LINE__, \
##__VA_ARGS__);
#define INFO(message, ...) LOG(message, "INFO", ##__VA_ARGS__);
#define DEBUG(message, ...) LO... | Add color for error log | Add color for error log
| C | mit | emengjzs/happyntrain |
a8b18b5159236f5b68e875ddf9ff0d52a0f8ea3c | swaybg/main.c | swaybg/main.c | #include <stdio.h>
#include <stdlib.h>
#include <wayland-client.h>
#include <time.h>
#include "client.h"
#include "log.h"
struct client_state *state;
void sway_terminate(void) {
client_teardown(state);
exit(1);
}
int main(int argc, char **argv) {
init_log(L_INFO);
state = client_setup();
uint8_t r = 0, g = 0, ... | #include <stdio.h>
#include <stdlib.h>
#include <wayland-client.h>
#include <time.h>
#include "client.h"
#include "log.h"
struct client_state *state;
void sway_terminate(void) {
client_teardown(state);
exit(1);
}
int main(int argc, char **argv) {
init_log(L_INFO);
if (!(state = client_setup())) {
return -1;
}... | Check the client_setup() return value | Check the client_setup() return value
| C | mit | 4e554c4c/sway,SirCmpwn/sway,crondog/sway,crondog/sway,taiyu-len/sway,mikkeloscar/sway,colemickens/sway,ptMuta/sway,johalun/sway,4e554c4c/sway,taiyu-len/sway,mikkeloscar/sway,sleep-walker/sway,ascent12/sway,sleep-walker/sway,1ace/sway,taiyu-len/sway,1ace/sway,colemickens/sway,christophgysin/sway,christophgysin/sway,1ace... |
037b274e82319843bc95d709b9e6261f7de39c4e | tests/auto/qgsttest.h | tests/auto/qgsttest.h | /*
Copyright (C) 2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
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 opti... | /*
Copyright (C) 2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
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 opti... | Use QGst::init/cleanup in the tests to properly register the ValueVTables for the gstreamer types. | Use QGst::init/cleanup in the tests to properly register the ValueVTables for the gstreamer types.
| C | lgpl-2.1 | freedesktop-unofficial-mirror/gstreamer__qt-gstreamer,cyndis/qtgstreamer,detrout/qt-gstreamer,ylatuya/qt-gstreamer,GStreamer/qt-gstreamer,ylatuya/qt-gstreamer,freedesktop-unofficial-mirror/gstreamer__qt-gstreamer,GStreamer/qt-gstreamer,cyndis/qtgstreamer,iperry/qt-gstreamer,shadeslayer/qtgstreamer,iperry/qt-gstreamer,s... |
b06fe693bbf13c9a8205eb03b3e12e6f87adc1c0 | lib/asan/lit_tests/TestCases/no_asan_gen_globals.c | lib/asan/lit_tests/TestCases/no_asan_gen_globals.c | // Make sure __asan_gen_* strings do not end up in the symbol table.
// RUN: %clang_asan %s -o %t.exe
// RUN: nm %t.exe | grep __asan_gen_ || exit 0
int x, y, z;
int main() { return 0; }
| Make sure none of the __asan_gen_ global strings end up in the symbol table, add a test. | [ASan] Make sure none of the __asan_gen_ global strings end up in the symbol table, add a test.
This should fix http://llvm.org/bugs/show_bug.cgi?id=17976
Another test checking for the global variables' locations and prefixes on Darwin will be committed separately.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95... | C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt | |
9773a97828cdec169d3e9c09326ed9b99cef25c6 | problem_001.c | problem_001.c | /*
* Multiples of 3 and 5
*
* If we list all the natural numbers below 10 that are multiples of 3 or 5,
* we get 3, 5, 6 and 9. The sum of these multiples is 23.
*
* Find the sum of all the multiples of 3 or 5 below 1000
*/
#include <stdio.h>
int
main(void)
{
int sum = 0, i = 0;
while (i < 1000) {
... | Add solution for problem 1 | Add solution for problem 1
| C | bsd-2-clause | skreuzer/euler | |
b26d114c3d5d3973fe85085f61e86efa6680260f | lib/quagga/src/common.h | lib/quagga/src/common.h | /*
* OLSRd Quagga plugin
*
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
* Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 a... | /*
* OLSRd Quagga plugin
*
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
* Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 a... | Change some char type variables to unsigned char | Change some char type variables to unsigned char
| C | bsd-3-clause | tdz/olsrd,duydb2/olsr,ninuxorg/olsrd,tdz/olsrd,servalproject/olsr,diogomg/olsrd-binary-heap,zioproto/olsrd-gsoc2012,duydb2/olsr,zioproto/olsrd,servalproject/olsr,ninuxorg/olsrd,acinonyx/olsrd,diogomg/olsrd-binary-heap,diogomg/olsrd,duydb2/olsr,diogomg/olsrd,servalproject/olsr,sebkur/olsrd,sebkur/olsrd,zioproto/olsrd-gs... |
2bc02ed37549e09ff449860a73aa03b326910f07 | bikepath/GeocodeItem.h | bikepath/GeocodeItem.h | //
// GeocodeItem.h
// bikepath
//
// Created by Farheen Malik on 8/19/14.
// Copyright (c) 2014 Bike Path. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface GeocodeItem : NSObject
@end
| //
// GeocodeItem.h
// bikepath
//
// Created by Farheen Malik on 8/19/14.
// Copyright (c) 2014 Bike Path. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
#import <GoogleMaps/GoogleMaps.h>
@interface GeocodeItem : NSObject
@property NSString *latitude;
@property NSString *lon... | Add address property to object | Add address property to object
| C | apache-2.0 | hushifei/bike-path,red-spotted-newts-2014/bike-path,red-spotted-newts-2014/bike-path |
c89fb451343e8acae2220881bd628e2cada8cb4a | packages/Python/lldbsuite/test/functionalities/swift-runtime-reporting/abi-v2/library.h | packages/Python/lldbsuite/test/functionalities/swift-runtime-reporting/abi-v2/library.h | // library.h
//
// 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 https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBU... | // library.h
//
// 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 https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBU... | Include the necessary headers to make the swift-runtime-reporting test work. | [testsuite] Include the necessary headers to make the swift-runtime-reporting test work.
| C | apache-2.0 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb |
fb3ef57e902e16fceb2486e4b9d956155966fa05 | strings/stringpiece_utils.h | strings/stringpiece_utils.h | // This is a placeholder to allow include-path compatibility with code written
// inside Google.
#ifndef STRINGS_STRINGPIECE_UTILS_H_
#define STRINGS_STRINGPIECE_UTILS_H_
#endif // STRINGS_STRINGPIECE_UTILS_H_
| Add a temporary dummy header file to make an internal refactoring process go more smoothly. | Add a temporary dummy header file to make an internal refactoring
process go more smoothly.
| C | apache-2.0 | VersoBit/mod_pagespeed,pagespeed/mod_pagespeed,VersoBit/mod_pagespeed,hashashin/src,VersoBit/mod_pagespeed,pagespeed/mod_pagespeed,hashashin/src,hashashin/src,hashashin/src,hashashin/src,pagespeed/mod_pagespeed,hashashin/src,VersoBit/mod_pagespeed,VersoBit/mod_pagespeed,pagespeed/mod_pagespeed,VersoBit/mod_pagespeed,pa... | |
0330581ab3b9002d55ee66f377ccbbb742175c01 | arch/powerpc/kernel/swsusp.c | arch/powerpc/kernel/swsusp.c | /*
* Common powerpc suspend code for 32 and 64 bits
*
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of t... | /*
* Common powerpc suspend code for 32 and 64 bits
*
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of t... | Fix the call trace when resumed from hibernation | powerpc/mm: Fix the call trace when resumed from hibernation
In SMP mode, the kernel would produce call trace when resumed
from hibernation. The reason is when the function destroy_context
is called to drop the resuming mm context, the mm->context.active
is 1 which is wrong and should be zero.
We pass the current... | C | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kana... |
a2400149f3df3b8848120d8242a12c5cc4e50eb5 | src/Persist.h | src/Persist.h | /* Copyright 2016 Streampunk Media Ltd.
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 wri... | /* Copyright 2016 Streampunk Media Ltd.
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 wri... | Add missing include for make_unique | Add missing include for make_unique
| C | apache-2.0 | Streampunk/codecadon,Streampunk/codecadon,Streampunk/codecadon,Streampunk/codecadon |
fca3fe6b3b8f7a918025c81597fe7e4c7e450887 | tests/lists/cl_list_tests.c | tests/lists/cl_list_tests.c | #include <stdio.h>
#include <stdlib.h>
#include <cl_list.h>
#include <cl_iterator.h>
#define QTD 100
| #include <stdio.h>
#include <stdlib.h>
#include <cl_list.h>
#include <cl_iterator.h>
#define QTD 100
void print_list_iter(cl_list_root *list) {
iterator_c *i = cl_iter_create(list, FORWARD);
printf("[");
if (i != NULL) {
do {
printf("'%d', ", *((int *) cl_iter_item(i)));
} while (cl_iter_next(i) && cl_iter... | Add list_iter for circular list test. | Add list_iter for circular list test.
| C | mit | vndmtrx/libadt |
40732a47d7d7e570a5124a6acf64665a0566dee9 | src/h/startup.h | src/h/startup.h | typedef struct {
int cluster; /* Condor Cluster # */
int proc; /* Condor Proc # */
int job_class; /* STANDARD, VANILLA, PVM, PIPE, ... */
uid_t uid; /* Execute job under this UID */
gid_t gid; /* Execute job under this pid */
pid_t virt_pid; /* PVM virt pid of this process */
int soft_ki... | typedef struct {
int cluster; /* Condor Cluster # */
int proc; /* Condor Proc # */
int job_class; /* STANDARD, VANILLA, PVM, PIPE, ... */
uid_t uid; /* Execute job under this UID */
gid_t gid; /* Execute job under this pid */
pid_t virt_pid; /* PVM virt pid of this process */
int soft_ki... | Add comment saying that even though the a.out file name is here, it really shouldn't be. | Add comment saying that even though the a.out file name is here, it really
shouldn't be.
| C | apache-2.0 | neurodebian/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,djw8605/condor,zhangzhehust/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,htcondor/htcondor,zhangzhehust/htcondor,neurodebian/h... |
e7baa2446426f801c372e771969f41b98c39e0bc | MUON/mapping/AliMpStationType.h | MUON/mapping/AliMpStationType.h | // $Id$
// Category: sector
//
// Enum AliMpStationType
// ---------------------
// Enumeration for refering to bending and non-bending planes.
//
// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_STATION_TYPE_H
#define ALI_MP_STATION_TYPE_H
enum AliMpStationType
{
kStation1, // station 1
kStat... | Update for station2: Initial version (I.Hrivnacova) | Update for station2:
Initial version
(I.Hrivnacova)
| C | bsd-3-clause | mkrzewic/AliRoot,shahor02/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,alisw/AliRoot,coppedis/AliRoot,shahor02/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,sebaleh/AliRoot,shahor02/AliRoot,ecalvovi/... | |
6a5a7dff3117f2e7093fed49bbbb7b2cd1d9704e | src/lib/llist.h | src/lib/llist.h | #ifndef LLIST_H
#define LLIST_H
/* Doubly linked list */
#define DLLIST_PREPEND(list, item) STMT_START { \
(item)->prev = NULL; \
(item)->next = *(list); \
if (*(list) != NULL) (*(list))->prev = (item); \
*(list) = (item); \
} STMT_END
#define DLLIST_REMOVE(list, item) STMT_START { \
if ((item)->prev == NULL) \... | #ifndef LLIST_H
#define LLIST_H
/* Doubly linked list */
#define DLLIST_PREPEND(list, item) STMT_START { \
(item)->prev = NULL; \
(item)->next = *(list); \
if (*(list) != NULL) (*(list))->prev = (item); \
*(list) = (item); \
} STMT_END
#define DLLIST_REMOVE(list, item) STMT_START { \
if ((item)->prev == NULL) \... | Set removed item's prev/next pointers to NULL. | DLLIST_REMOVE(): Set removed item's prev/next pointers to NULL.
--HG--
branch : HEAD
| C | mit | dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot |
2c84316746fa61b35efbc0c334fcb2a6dec0d53d | src/vasprintf.c | src/vasprintf.c | #include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
int vasprintf(char **ret, const char *fmt, va_list ap)
{
char *buf;
int len;
size_t buflen;
va_list ap2;
#ifdef _MSC_VER
ap2 = ap;
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
#else
va_copy(ap2, ap);
len = vsnprintf(NULL, 0, fmt,... | #include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
int vasprintf(char **ret, const char *fmt, va_list ap)
{
char *buf;
int len;
size_t buflen;
va_list ap2;
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
ap2 = ap;
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
#else
va_cop... | Use _vscprintf() for mingw-w64 compilers | Use _vscprintf() for mingw-w64 compilers
The mingw-w64 compilers implement a vsnprintf() function that do not
conform to the C99 standard (just like MSVC).
| C | mit | mono/eglib,mono/eglib |
4f1caf24100fb7a0d0c1ab8fcc10f2e9a412e0cd | 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 CefRequest... | // 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 CefRequest... | Change to use IRequest instead (use interfaces for classes where possible) | Change to use IRequest instead (use interfaces for classes where possible)
| C | bsd-3-clause | wangzheng888520/CefSharp,joshvera/CefSharp,Haraguroicha/CefSharp,Haraguroicha/CefSharp,dga711/CefSharp,rlmcneary2/CefSharp,haozhouxu/CefSharp,ruisebastiao/CefSharp,yoder/CefSharp,illfang/CefSharp,battewr/CefSharp,zhangjingpu/CefSharp,illfang/CefSharp,twxstar/CefSharp,windygu/CefSharp,ITGlobal/CefSharp,jamespearce2006/C... |
d6b237df5e17eab304b62a01ff377a1e9fda0caf | win32/PlatWin.h | win32/PlatWin.h | // Scintilla source code edit control
/** @file PlatWin.h
** Implementation of platform facilities on Windows.
**/
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
extern bool IsNT();
extern void Platform_Initi... | // Scintilla source code edit control
/** @file PlatWin.h
** Implementation of platform facilities on Windows.
**/
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
extern bool IsNT();
extern void Platform_Initi... | Allow choice of D2D on compiler command line. | Allow choice of D2D on compiler command line.
| C | isc | timonwong/foo_uie_wsh_panel_mod.scintilla,timonwong/foo_uie_wsh_panel_mod.scintilla,timonwong/foo_uie_wsh_panel_mod.scintilla,timonwong/foo_uie_wsh_panel_mod.scintilla,timonwong/foo_uie_wsh_panel_mod.scintilla,timonwong/foo_uie_wsh_panel_mod.scintilla,timonwong/foo_uie_wsh_panel_mod.scintilla,timonwong/foo_uie_wsh_pane... |
83e16fa7755f2b4c908366d28aa83180a2d9e817 | PHPHub/Constants/SecretConstant.example.h | PHPHub/Constants/SecretConstant.example.h | //
// SecretConstant.example.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#if DEBUG
#define Client_id @"kHOugsx4dmcXwvVbmLkd"
#define Client_secret @"PuuFCrF94MloSbSkxpwS"
#else
#define Client_id @"Set up a client id for production env"
#defi... | //
// SecretConstant.example.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#if DEBUG
#define Client_id @"kHOugsx4dmcXwvVbmLkd"
#define Client_secret @"PuuFCrF94MloSbSkxpwS"
#else
#define Client_id @"" // Set up a client id for production envir... | Update comments of SecretConstant file | Update comments of SecretConstant file
| C | mit | Aufree/phphub-ios |
a8d2223c18dad7981b74670ef719d9dcc5833679 | ann.h | ann.h | #ifndef ANN_H
#define ANN_H
#endif
| #ifndef ANN_H
#define ANN_H
#define INPUTS 3
#define HIDDEN 5
#define OUTPUTS 2
#define ROWS 5
typedef struct {
double input[HIDDEN][INPUTS + 1];
double hidden[ROWS - 3][HIDDEN][HIDDEN + 1];
double output[OUTPUTS][HIDDEN + 1];
} Links;
typedef struct {
int input[INPUTS];
int hidden[ROWS - 2][HIDD... | Create contents of .h file | Create contents of .h file
| C | mit | tysonzero/c-ann |
777e88ac428fa5af101a3345359fa563fd7c1e8e | IAAI.c | IAAI.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STTY "/bin/stty "
const char RAW[] = STTY "raw";
const char COOKED[] = STTY "cooked";
int main() {
system(RAW);
char str[] = "I AM AN IDIOT ";
size_t len = strlen(str);
while ( 1 ) {
for ( size_t i = 0 ; i < len ; i++ ) {
getchar()... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STTY "/bin/stty "
const char RAW[] = STTY "raw";
const char COOKED[] = STTY "cooked";
const char default_str[] = "I AM AN IDIOT ";
int main(int argc, char **argv) {
system(RAW);
const char *str;
if ( argc == 2 )
str = argv[1];
else
s... | Allow user to choose if they want :) | Allow user to choose if they want :)
| C | mit | vinamarora8/IAAI |
a528fce787eb40471330c0464848b8a6b9f72b44 | Tokaido/TKDApp.h | Tokaido/TKDApp.h | //
// TKDApp.h
// Tokaido
//
// Created by Mucho Besos on 10/25/12.
// Copyright (c) 2012 Tilde. All rights reserved.
//
#import <Cocoa/Cocoa.h>
typedef enum : NSUInteger {
TKDAppOff,
TKDAppBooting,
TKDAppOn,
TKDAppShuttingDown
} TKDAppState;
@interface TKDApp : MTLModel
@property (nonatomic, co... | //
// TKDApp.h
// Tokaido
//
// Created by Mucho Besos on 10/25/12.
// Copyright (c) 2012 Tilde. All rights reserved.
//
#import <Cocoa/Cocoa.h>
typedef enum : NSUInteger {
TKDAppOff,
TKDAppBooting,
TKDAppOn,
TKDAppShuttingDown
} TKDAppState;
typedef enum : NSUInteger {
TKDAppBundling,
TK... | Add booting substate for message | Add booting substate for message | C | mit | webdev1001/tokaidoapp,tokaido/tokaidoapp,tokaido/tokaidoapp,webdev1001/tokaidoapp,webdev1001/tokaidoapp,webdev1001/tokaidoapp,tokaido/tokaidoapp |
30658b235a7a7b8df8164741d03dd9fc6e45129d | system/coro.c | system/coro.c | #include "coro.h"
#include "stack.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
coro *coro_spawn(coro *me, coro_func f, size_t ssize) {
coro *c = (coro*)malloc(sizeof(coro));
assert(c != NULL);
c->running = 0;
c->base = malloc(ssize);
assert(c->base != NULL);
c->stack = c->base + ssize;
... | #include "coro.h"
#include "stack.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
coro *coro_spawn(coro *me, coro_func f, size_t ssize) {
coro *c = (coro*)malloc(sizeof(coro));
assert(c != NULL);
c->running = 0;
c->base = malloc(ssize);
assert(c->base != NULL);
c->stack = (char*) c->base + s... | Make pointer arithmetic warning go away | Make pointer arithmetic warning go away
| C | bsd-3-clause | buaasun/grappa,buaasun/grappa,alexfrolov/grappa,alexfrolov/grappa,alexfrolov/grappa,alexfrolov/grappa,uwsampa/grappa,uwsampa/grappa,uwsampa/grappa,alexfrolov/grappa,uwsampa/grappa,uwsampa/grappa,alexfrolov/grappa,buaasun/grappa,buaasun/grappa,alexfrolov/grappa,buaasun/grappa,buaasun/grappa,buaasun/grappa,uwsampa/grappa... |
cfab8acf28fd7aff0b2d355c9935b028376ea08e | sequence.h | sequence.h | #ifndef SEQUENCE_H
#define SEQUENCE_H
#include "object.h"
typedef enum IterType_ {ITERLIST, ITERVECTOR} IterType;
typedef struct Iter_ {
IterType type;
union {
struct {
Object *node;
bool first;
} list;
struct {
Object *object;
int inde... | #ifndef SEQUENCE_H
#define SEQUENCE_H
#include "object.h"
typedef enum IterType_ {ITERLIST, ITERVECTOR} IterType;
typedef struct Iter_ {
IterType type;
union {
struct {
Object *node;
bool first;
} list;
struct {
Object *object;
int inde... | Mark some functions as pure | Mark some functions as pure
| C | mit | ids1024/idslisp |
d61970e389e32156543068e359c5af767bb3e549 | src/main.h | src/main.h | #pragma once
#include <unistd.h>
#include <iostream>
#include <list>
#include <map>
#include <mutex>
#include <unordered_map>
#include <queue>
#include <sstream>
#include <thread>
#include <tuple>
#include <vector> | #pragma once
#include <unistd.h>
#include <iostream>
#include <list>
#include <map>
#include <mutex>
#include <unordered_map>
#include <queue>
#include <sstream>
#include <set>
#include <thread>
#include <tuple>
#include <vector> | Include missing necessary include <set> | Include missing necessary include <set>
| C | mit | ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo |
1a16a79939e53044d07009bc746cfe9a08e878d4 | IA32ABI/xabicc.c | IA32ABI/xabicc.c | /*
* xabicc.c - platform-agnostic root for ALien call-outs and callbacks.
*
* Support for Call-outs and Call-backs from the IA32ABI Plugin.
* The plgin is misnamed. It should be the AlienPlugin, but its history
* dictates otherwise.
*/
#if i386|i486|i586|i686
# include "ia32abicc.c"
#elif powerpc|ppc
# include ... | /*
* xabicc.c - platform-agnostic root for ALien call-outs and callbacks.
*
* Support for Call-outs and Call-backs from the IA32ABI Plugin.
* The plgin is misnamed. It should be the AlienPlugin, but its history
* dictates otherwise.
*/
#if i386|i486|i586|i686
# include "ia32abicc.c"
#elif powerpc|ppc
# include ... | Make the list of x64 processor names inclusive enough to compile the Alien plugin on 64-bit linux. | Make the list of x64 processor names inclusive enough to compile the Alien
plugin on 64-bit linux.
git-svn-id: http://squeakvm.org/svn/squeak/trunk@3237 fa1542d4-bde8-0310-ad64-8ed1123d492a
Former-commit-id: 600bd5e36821553d6b9391d8bbd8d75d4ad10a85 | C | mit | timfel/squeakvm,timfel/squeakvm,timfel/squeakvm,bencoman/pharo-vm,peteruhnak/pharo-vm,timfel/squeakvm,bencoman/pharo-vm,peteruhnak/pharo-vm,bencoman/pharo-vm,timfel/squeakvm,bencoman/pharo-vm,timfel/squeakvm,timfel/squeakvm,bencoman/pharo-vm,timfel/squeakvm,bencoman/pharo-vm,peteruhnak/pharo-vm,OpenSmalltalk/vm,OpenSma... |
03aa0b50b157b97af1dbaf93461c4941bc0bbfaa | benchs/MatMulC.c | benchs/MatMulC.c | #include <stdlib.h>
#include "MatMulC.h"
void MatMulC(int rows, int len, double *a, double *b, double *c)
{
int i,j,k;
for( i = 0; i < rows; i++ ) {
for( j = 0; j < rows; j+=2 ) {
double sum0 = 0.0;
double sum1 = 0.0;
for( k = 0; k < rows; k++ ) {
sum0 += a[i*rows+k] * b[k*rows + j];... | #include <stdlib.h>
#include "MatMulC.h"
void MatMulC(int rows, int len, double *a, double *bin, double *c)
{
int i,j,k;
double *b = malloc(len * sizeof(double));
// Transpose bin with result in b.
for(int n = 0; n < len; n++ ) {
b[n] = bin[rows * (n % rows) + (n / rows)];
}
for( i = 0; i < rows; i++... | Transpose the second matrix in the C reference for MatMul. | Transpose the second matrix in the C reference for MatMul.
| C | bsd-3-clause | emwap/feldspar-compiler,emwap/feldspar-compiler |
45fb9eb248df779c8fa845dac32bcafd2c129d40 | include/LinearLayout.h | include/LinearLayout.h | #ifndef _LINEARLAYOUT_H_
#define _LINEARLAYOUT_H_
#include <Element.h>
#include <Command.h>
#define FW_VERTICAL 1
#define FW_HORIZONTAL 2
class LinearLayout : public Element {
public:
LinearLayout(int _direction, int _id) : Element(_id), direction(_direction) { }
bool isA(const std::string & className) overri... | #ifndef _LINEARLAYOUT_H_
#define _LINEARLAYOUT_H_
#include <Element.h>
#include <Command.h>
#define FW_VERTICAL 1
#define FW_HORIZONTAL 2
class LinearLayout : public Element {
public:
LinearLayout(int _direction, int _id = 0) : Element(_id), direction(_direction) { }
bool isA(const std::string & className) ov... | Add default value to id on constructor | Add default value to id on constructor | C | mit | Sometrik/framework,Sometrik/framework,Sometrik/framework |
e800dd51a625cadc087c40cd41fd31d68e4f52bc | include/scopemeasure.h | include/scopemeasure.h | #ifndef NEWSBOAT_SCOPEMEASURE_H_
#define NEWSBOAT_SCOPEMEASURE_H_
#include <sys/time.h>
#include <string>
#include "logger.h"
namespace newsboat {
class ScopeMeasure {
public:
ScopeMeasure(const std::string& func, Level ll = Level::DEBUG);
~ScopeMeasure();
void stopover(const std::string& son = "");
private:
s... | #ifndef NEWSBOAT_SCOPEMEASURE_H_
#define NEWSBOAT_SCOPEMEASURE_H_
#include <sys/time.h>
#include <string>
#include "logger.h"
namespace newsboat {
class ScopeMeasure {
public:
ScopeMeasure(const std::string& func, Level ll = Level::DEBUG);
~ScopeMeasure();
void stopover(const std::string& son = "");
private:
s... | Initialize all members of ScopeMeasure | Initialize all members of ScopeMeasure
Problem spotted by PVS Studio.
| C | mit | newsboat/newsboat,der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat |
3b7da8cd1e2f77d73cc19533fc657ba10a80c8cd | include/tgbot/export.h | include/tgbot/export.h | #ifndef TGBOT_EXPORT_H
#define TGBOT_EXPORT_H
#ifndef TGBOT_API
#ifdef TGBOT_DLL
#if defined _WIN32 || defined __CYGWIN__
#define TGBOT_HELPER_DLL_IMPORT __declspec(dllimport)
#define TGBOT_HELPER_DLL_EXPORT __declspec(dllexport)
#else
#if __GNUC__ >= 4
... | #ifndef TGBOT_EXPORT_H
#define TGBOT_EXPORT_H
#ifndef TGBOT_API
#ifdef TGBOT_DLL
#if defined _WIN32 || defined __CYGWIN__
#define TGBOT_HELPER_DLL_EXPORT __declspec(dllexport)
#define TGBOT_HELPER_DLL_IMPORT __declspec(dllimport)
#else
#if __GNUC__ >= 4
... | Fix mistake FOX and reorder EXPORT/IMPORT | Fix mistake FOX and reorder EXPORT/IMPORT
| C | mit | reo7sp/tgbot-cpp,reo7sp/tgbot-cpp,reo7sp/tgbot-cpp |
37b123271739ea3a8dcd9397873b9c2e9949fe6f | packages/Python/lldbsuite/test/make/pseudo_barrier.h | packages/Python/lldbsuite/test/make/pseudo_barrier.h | #include <atomic>
#include <thread>
typedef std::atomic<int> pseudo_barrier_t;
static inline void pseudo_barrier_wait(pseudo_barrier_t &barrier) {
--barrier;
while (barrier > 0)
std::this_thread::yield();
}
static inline void pseudo_barrier_init(pseudo_barrier_t &barrier, int count) {
barrier = count;
}
| #include <atomic>
// Note that although hogging the CPU while waiting for a variable to change
// would be terrible in production code, it's great for testing since it avoids
// a lot of messy context switching to get multiple threads synchronized.
typedef std::atomic<int> pseudo_barrier_t;
#define pseudo_barrier_wa... | Revert "[test] Address TestConcurrentMany*.py flakiness on macOS" | Revert "[test] Address TestConcurrentMany*.py flakiness on macOS"
This reverts my change to pseudo_barrier.h which isn't necessary anymore
after Fred's fix to debugserver and caused TestThreadStepOut to fail.
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@370963 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb |
0db658e796e364ebbd401d03b4b14961c59da77b | States/StatesController+DragNDrop.h | States/StatesController+DragNDrop.h | //
// StatesController+DragNDrop.h
// States
//
// Created by Dmitry Rodionov on 13/06/16.
// Copyright © 2016 Internals Exposed. All rights reserved.
//
#import "StatesController.h"
@interface StatesController (DragNDrop)
@end
| //
// StatesController+DragNDrop.h
// States
//
// Created by Dmitry Rodionov on 13/06/16.
// Copyright © 2016 Internals Exposed. All rights reserved.
//
#import "StatesController.h"
@interface StatesController (DragNDrop)
// This category implements the following NSTableViewDataSources methods:
- (BOOL)tableVi... | Add missing header into for DragNDrop category on StatesContoller | Add missing header into for DragNDrop category on StatesContoller
| C | mit | edenvidal/States,edenvidal/States |
3a7937af55780e9b2d38ff234d8ddbda90578313 | You-GUI/stdafx.h | You-GUI/stdafx.h | //@author A0094446X
#pragma once
#ifndef YOU_GUI_STDAFX_H_
#define YOU_GUI_STDAFX_H_
#include <QtWidgets>
#endif // YOU_GUI_STDAFX_H_
| //@author A0094446X
#pragma once
#ifndef YOU_GUI_STDAFX_H_
#define YOU_GUI_STDAFX_H_
#include <memory>
#include <QApplication>
#include <QList>
#include <QWidget>
#include <QtWidgets>
#include <boost/date_time/gregorian/greg_month.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#endif // YOU_GUI_STDAFX_H_... | Add more files to the PCH for faster compiles. | Add more files to the PCH for faster compiles.
| C | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
e567e0d86bcabd0746ec0704ea56598d8c15d728 | Settings/Controls/Controls.h | Settings/Controls/Controls.h | #pragma once
#include "Control.h"
#include "Button.h"
#include "Checkbox.h"
#include "ComboBox.h"
#include "Label.h"
#include "ListView.h"
#include "Spinner.h"
#include "EditBox.h"
| #pragma once
#include "Control.h"
#include "Button.h"
#include "Checkbox.h"
#include "ComboBox.h"
#include "GroupBox.h"
#include "Label.h"
#include "ListView.h"
#include "Spinner.h"
#include "EditBox.h"
| Add groupbox to control header | Add groupbox to control header
| C | bsd-2-clause | malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX |
dd487c159bb93639ce574ab2e5340be5cbf4a4d1 | test/CFrontend/2007-08-01-LoadStoreAlign.c | test/CFrontend/2007-08-01-LoadStoreAlign.c | // RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep -c {align 1} | grep 2
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
struct p {
char a;
int b;
} __attribute__ ((packed));
struct p t = { 1, 10 };
struct p u;
int main () {
int tmp = t.b;
u.b = tmp;
return tmp;
}
| Add a test for the load/store alignment. | Add a test for the load/store alignment.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@40687 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOp... | |
583acd2de697ec1f6d148755fe01df3ba97d7bfd | nbtk/nbtkmodule.c | nbtk/nbtkmodule.c | #include <pygobject.h>
#include <clutter/clutter.h>
void pynbtk_register_classes (PyObject *d);
void pynbtk_add_constants (PyObject *module, const gchar *prefix);
extern PyMethodDef pynbtk_functions[];
DL_EXPORT(void)
init_nbtk(void)
{
PyObject *m, *d;
init_pygobject_check (2, 12, 0);
m = Py_InitM... | #include <pygobject.h>
#include <nbtk/nbtk.h>
void pynbtk_register_classes (PyObject *d);
void pynbtk_add_constants (PyObject *module, const gchar *prefix);
extern PyMethodDef pynbtk_functions[];
static void
sink_nbtkaction (GObject *object)
{
if (g_object_is_floating (object))
g_object_ref_sink (object);
}... | Add a sink function for nbtk.Action | Add a sink function for nbtk.Action
NbtkAction is a GInitiallyUnowned, so we need to register a sinkfunc.
| C | lgpl-2.1 | buztard/mxpy,buztard/mxpy,buztard/mxpy |
bd6a64a57f85933059231789ed6ec117bd1089da | ADLivelyCollectionView.h | ADLivelyCollectionView.h | //
// ADLivelyCollectionView.h
// ADLivelyCollectionView
//
// Created by Romain Goyet on 18/04/12.
// Copyright (c) 2012 Applidium. All rights reserved.
//
#import <UIKit/UIKit.h>
extern NSTimeInterval ADLivelyDefaultDuration;
typedef NSTimeInterval (^ADLivelyTransform)(CALayer * layer, float speed);
extern ADL... | //
// ADLivelyCollectionView.h
// ADLivelyCollectionView
//
// Created by Romain Goyet on 18/04/12.
// Copyright (c) 2012 Applidium. All rights reserved.
//
#import <UIKit/UIKit.h>
extern NSTimeInterval ADLivelyDefaultDuration;
typedef NSTimeInterval (^ADLivelyTransform)(CALayer * layer, float speed);
extern ADL... | Add comment for the speed threshold | Add comment for the speed threshold
| C | bsd-3-clause | applidium/ADLivelyCollectionView |
22eb291b9dc8943094e143a71c3eac237f4a54c2 | command_mode.c | command_mode.c | #include "mode.h"
#include <stdlib.h>
#include <string.h>
#include <termbox.h>
#include "buf.h"
#include "editor.h"
static void command_mode_key_pressed(editor_t *editor, struct tb_event *ev) {
char ch;
switch (ev->key) {
case TB_KEY_ESC:
buf_printf(editor->status, "");
editor->mode = normal_mode();
... | #include "mode.h"
#include <stdlib.h>
#include <string.h>
#include <termbox.h>
#include "buf.h"
#include "editor.h"
// TODO(isbadawi): Command mode needs a cursor, but modes don't affect drawing.
static void command_mode_key_pressed(editor_t *editor, struct tb_event *ev) {
char ch;
switch (ev->key) {
case TB_... | Add TODO re: command mode cursor. | Add TODO re: command mode cursor.
This will also be an issue for visual mode.
| C | mit | isbadawi/badavi |
ae5e1b42c06cf04a2fcf6ec78c4b028aa69791eb | ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h | ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h | //
// UIActionSheet+RACSignalSupport.h
// ReactiveCocoa
//
// Created by Dave Lee on 2013-06-22.
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@class RACDelegateProxy;
@class RACSignal;
@interface UIActionSheet (RACSignalSupport)
// A delegate proxy which will be set as the ... | //
// UIActionSheet+RACSignalSupport.h
// ReactiveCocoa
//
// Created by Dave Lee on 2013-06-22.
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@class RACDelegateProxy;
@class RACSignal;
@interface UIActionSheet (RACSignalSupport)
// A delegate proxy which will be set as the ... | Copy documentation wording from UITextView+RACSignalSupport.h | Copy documentation wording from UITextView+RACSignalSupport.h
| C | mit | buildo/ReactiveCocoa,ioshger0125/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,fanghao085/ReactiveCocoa,cstars135/ReactiveCocoa,itschaitanya/ReactiveCocoa,longv2go/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,paulyoung/ReactiveCocoa,itschaitanya/ReactiveCocoa,Ray0218/ReactiveCocoa,Carthage/ReactiveCocoa,qq644531343/ReactiveCoco... |
9e903e78de2ca4a4b4aaa80b2dc6320e581c87da | c-in-mips.c | c-in-mips.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
static int RegisterFile[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int main() {
int data_memory[1024];
char string_memeory[2014];
} | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
static int RegisterFile[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int main() {
int data_memory[1024];
char* string_memory[2014];
char* instructions[100];
... | Fix typos, add instruction memory | Fix typos, add instruction memory
| C | apache-2.0 | jacobbieker/MIPS-In-C |
c13048b862e88494460d6e70c5ce83f99f3393a8 | examples/locks.c | examples/locks.c | #include <stddef.h>
#include "atomic.h"
#include "rmc.h"
///
// Needs to live somewhere else at some point
// Argh, what do we name these.
#include "stdatomic.h"
#define atomic_fixup(e) ((_Atomic(__typeof__(*e))*)(e))
#define rmc_compare_exchange_strong(object, expected, desired) \
atomic_compare_exchange... | Add some tests with RMWs | Add some tests with RMWs
| C | mit | msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler | |
8800559e793472408e0d44efeb4642bf3808f13e | 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 108
#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 109
#endif
| Update Skia milestone to 109 | Update Skia milestone to 109
Change-Id: I6acfef789b38f71183304cc3741c119265561b3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/591477
Reviewed-by: Rakshit Sharma <e91e6cdce3825eaad0fa11b55195605cfed87fab@google.com>
Owners-Override: Kevin Lubick <7cdab2cfab351f23814786ba39716e90eed69047@google.com>
Auto-... | C | bsd-3-clause | google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia |
80475026890a36dea4915fc9261a879ed24cca99 | Wangscape/codecs/TileLocationCodec.h | Wangscape/codecs/TileLocationCodec.h | #pragma once
#include <spotify/json.hpp>
#include "TileLocation.h"
using namespace spotify::json::codec;
namespace spotify
{
namespace json
{
template<>
struct default_codec_t<TileLocation>
{
static object_t<TileLocation> codec()
{
auto codec = object<TileLocation>();
codec.required("filena... | Add a codec for TileLocation | Add a codec for TileLocation
| C | mit | serin-delaunay/Wangscape,serin-delaunay/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape | |
5cec34cba823feb1e1b47d95de433f1ac96ea873 | is/ac_tlm_bus/ac_tlm_bus.h | is/ac_tlm_bus/ac_tlm_bus.h | #ifndef AC_TLM_BUS_H_
#define AC_TLM_BUS_H_
#include <systemc>
#include "ac_tlm_protocol.H"
#include "ac_tlm_port.H"
#include "ac_memport.H"
// using statements
using tlm::tlm_transport_if;
//#define DEBUG
/// Namespace to isolate bus from ArchC
namespace user
{
/// A TLM bus
class ac_tlm_bus :
public sc_module,... | #ifndef AC_TLM_BUS_H_
#define AC_TLM_BUS_H_
#include <systemc>
#include "ac_tlm_protocol.H"
#include "ac_tlm_port.H"
#include "ac_memport.H"
// using statements
using tlm::tlm_transport_if;
//#define DEBUG
/// Namespace to isolate bus from ArchC
namespace user
{
/// A TLM bus
class ac_tlm_bus :
public sc_module,... | Make room for 8 processors in the bus. | Make room for 8 processors in the bus.
| C | lgpl-2.1 | eggpi/mc723-p3,guilherme-pg/mc723-p3,guilherme-pg/mc723-p3,eggpi/mc723-p3,eggpi/mc723-p3,guilherme-pg/mc723-p3,guilherme-pg/mc723-p3,eggpi/mc723-p3 |
e40600458fdf7a84940f1de3103886173646b19b | lib/libncurses/lib_insdel.c | lib/libncurses/lib_insdel.c |
/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
* details. If they are missing then this copy is in violation of *
* the copyright conditions. */
/*
** lib_insdel.c
**
** The routine winsdel(win, n).
** positive n insert n lines above current line
**... |
/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
* details. If they are missing then this copy is in violation of *
* the copyright conditions. */
/*
** lib_insdel.c
**
** The routine winsdel(win, n).
** positive n insert n lines above current line
**... | Handle the condition where BS is typed while the cursor is at the first position on either of the last two lines of the screen. Ie. append contents of current line to the previous line and scroll the next line's contents up. | Handle the condition where BS is typed while the cursor is
at the first position on either of the last two lines of the
screen. Ie. append contents of current line to the previous
line and scroll the next line's contents up.
PR: 5392
Submitted by: Kouichi Hirabayashi <kh@mogami-wire.co.jp>
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase |
217625d26001121e40c1e309321d2b9a104623f6 | wisp.c | wisp.c | #include <stdio.h>
#include "common.h"
#include "wisp.h"
#include "lisp.h"
/* parser crap */
extern FILE *yyin;
int yyparse ();
void parser_init ();
extern int interactive;
extern char *prompt;
/* Initilize all the systems. */
void init ()
{
/* These *must* be called in this order. */
object_init ();
symtab_ini... | #include <stdio.h>
#include "common.h"
#include "wisp.h"
#include "lisp.h"
/* parser crap */
extern FILE *yyin;
int yyparse ();
void parser_init ();
extern int interactive;
extern char *prompt;
/* Initilize all the systems. */
void init ()
{
/* These *must* be called in this order. */
object_init ();
symtab_ini... | Print newline on clean exit. | Print newline on clean exit.
| C | unlicense | skeeto/wisp,skeeto/wisp |
3eb22eb7df20a7254a0b70512ca026a440152a86 | inline_dbg_lbl.c | inline_dbg_lbl.c | // ucc -g tim.c
_Noreturn void abort()
{
__builtin_unreachable();
}
void realloc()
{
int local = 5;
abort();
}
| Debug label inline function bug | Debug label inline function bug
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler | |
dbf67e0819451323569fbdfc4280ad4cb2310d39 | bugs/cpp/strip_comment.c | bugs/cpp/strip_comment.c | #define typename(x) _Generic((x), \
_Bool: "_BoolÓ, unsigned char: "unsigned charÓ, \
char: "char", signed char: "signed char", \
void *: "pointer to voidÓ, int *: "pointer to ... | #define typename(x) _Generic((x), \
_Bool: "_Bool", unsigned char: "unsigned char", \
char: "char", signed char: "signed char", \
void *: "pointer to void", int *: "pointer to ... | Remove unicode from cpp bug example | Remove unicode from cpp bug example
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler |
8e237cddafb82de65bdca14de6a4b05d3f51b2ea | goontools.c | goontools.c | #include "goontools.h"
void usage(char* prog)
{
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s <subcommand> <subcommand arguments>\n", prog);
fprintf(stderr, "\n");
fprintf(stderr, "subcommands:\n");
fprintf(stderr, " index index file\n");
fprintf(stderr, " sort sort file\n");
... | #include "goontools.h"
void usage(char* prog)
{
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s <subcommand> <subcommand arguments>\n", prog);
fprintf(stderr, "\n");
fprintf(stderr, "subcommands:\n");
fprintf(stderr, " index index file\n");
fprintf(stderr, " sort sort file\n");
... | Make subcommands' argc/argv compatible with getopt | Make subcommands' argc/argv compatible with getopt
| C | mit | mhyfritz/goontools,mhyfritz/goontools,mhyfritz/goontools |
d1940709771ccf2835a019fc095880e3192eae93 | inc/time_hao.h | inc/time_hao.h | #ifndef TIME_HAO
#define TIME_HAO
#include <time.h>
class Timer_hao
{
public:
double seconds;
int timing_flag;
time_t timerinit,timerend;
Timer_hao();
Timer_hao(double);
Timer_hao(const Timer_hao& );
~Timer_hao();
Timer_hao& operator = (const Timer_hao&);
void init()... | #ifndef TIME_HAO_H
#define TIME_HAO_H
#include <time.h>
class Timer_hao
{
public:
double seconds;
int timing_flag;
time_t timerinit,timerend;
Timer_hao();
Timer_hao(double);
Timer_hao(const Timer_hao& );
~Timer_hao();
Timer_hao& operator = (const Timer_hao&);
void in... | Set the header protection to end with _H. | Set the header protection to end with _H.
| C | mit | hshi/time_lib_hao |
fa64def4cb805afb0cc8d966dab534e9137f3c66 | src/Settings.h | src/Settings.h | // This program is free software licenced under MIT Licence. You can
// find a copy of this licence in LICENCE.txt in the top directory of
// source code.
//
#ifndef SETTINGS_H_INCLUDED
#define SETTINGS_H_INCLUDED
#include <vector>
#include <tuple>
/**
* This file contains gereral configuration and thing whoch sho... | // This program is free software licenced under MIT Licence. You can
// find a copy of this licence in LICENCE.txt in the top directory of
// source code.
//
#ifndef SETTINGS_H_INCLUDED
#define SETTINGS_H_INCLUDED
#include <vector>
#include <tuple>
/**
* This file contains gereral configuration and thing whoch sho... | Update number of armies on wastelands | Update number of armies on wastelands
| C | mit | calincru/Warlight-AI-Challenge-2-Bot,calincru/Warlight-AI-Challenge-2-Bot |
194e314afe721d748735114c68b9a723a8f74b05 | Riot/SupportingFiles/Riot-Bridging-Header.h | Riot/SupportingFiles/Riot-Bridging-Header.h | //
// Use this file to import your target's public headers that you would like to expose to Swift.
//
@import MatrixSDK;
@import MatrixKit;
#import "WebViewViewController.h"
#import "RiotNavigationController.h"
#import "ThemeService.h"
#import "TableViewCellWithCheckBoxAndLabel.h"
#import "RecentsDataSource.h"
#impo... | //
// Use this file to import your target's public headers that you would like to expose to Swift.
//
@import MatrixSDK;
@import MatrixKit;
#import "WebViewViewController.h"
#import "RiotNavigationController.h"
#import "ThemeService.h"
#import "TableViewCellWithCheckBoxAndLabel.h"
#import "RecentsDataSource.h"
#impo... | Add RoomBubbleCellData.h and MXKRoomBubbleTableViewCell+Riot.h to Objective-C bridging header. | Add RoomBubbleCellData.h and MXKRoomBubbleTableViewCell+Riot.h to Objective-C bridging header.
| C | apache-2.0 | vector-im/riot-ios,vector-im/riot-ios,vector-im/riot-ios,vector-im/riot-ios,vector-im/riot-ios,vector-im/vector-ios,vector-im/vector-ios,vector-im/riot-ios,vector-im/vector-ios |
2af33bb34a78b1ecd91cc9f9d92351e7a762530b | src/cilkplus.h | src/cilkplus.h | #ifndef CILKPLUS_H
#define CILKPLUS_H
#include <cilk/cilk.h>
#define fibril
#define fibril_t __attribute__((unused)) int
#define fibril_init(fp)
#define fibril_join(fp) cilk_sync
#define fibril_fork_nrt(fp, fn, ag) cilk_spawn fn ag
#define fibril_fork_wrt(fp, rt, fn, ag) rt = cilk_spawn fn ag
#define fibril_rt_... | #ifndef CILKPLUS_H
#define CILKPLUS_H
#include <cilk/cilk.h>
#define fibril
#define fibril_t __attribute__((unused)) int
#define fibril_init(fp)
#define fibril_join(fp) cilk_sync
#define fibril_fork_nrt(fp, fn, ag) cilk_spawn fn ag
#define fibril_fork_wrt(fp, rt, fn, ag) rt = cilk_spawn fn ag
#define fibril_rt_... | Use 8MB as the default stack size in CilkPlus. | Use 8MB as the default stack size in CilkPlus.
| C | mit | chaoran/fibril,chaoran/fibril,chaoran/fibril |
80dadf74982bc78acb1fedd5e9e65f754d6bbee8 | native/spinner_with_stacks/program.c | native/spinner_with_stacks/program.c | #include <stdio.h>
void SpinYetAgain()
{
volatile unsigned int count = 0;
for(int i=0; i<1000; i++)
{
count++;
}
}
void SpinSomeMore()
{
volatile unsigned int count = 0;
for(int i=0; i<1000; i++)
{
count++;
}
SpinYetAgain();
}
void Spin()
{
volatile unsigned i... | #include <stdio.h>
void SpinYetAgain()
{
volatile unsigned int count = 0;
int i;
for(i=0; i<1000; i++)
{
count++;
}
}
void SpinSomeMore()
{
volatile unsigned int count = 0;
int i;
for(i=0; i<1000; i++)
{
count++;
}
SpinYetAgain();
}
void Spin()
{
volat... | Fix C declaration errors on ARM. | Fix C declaration errors on ARM.
| C | mit | brianrob/coretests,brianrob/coretests |
cee852ab5abc167b1996043f2398e47902ca7068 | project_config/lmic_project_config.h | project_config/lmic_project_config.h | // project-specific definitions for otaa sensor
//#define CFG_eu868 1
//#define CFG_us915 1
//#define CFG_au921 1
#define CFG_as923 1
#define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
| // project-specific definitions for otaa sensor
//#define CFG_eu868 1
//#define CFG_us915 1
//#define CFG_au921 1
#define CFG_as923 1
#define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
#define LMIC_DEBUG_LEVEL 2
#define LMIC_DEBUG_PRINTF_FN lm... | Set debug level to 2 and use a suitable printf function | Set debug level to 2 and use a suitable printf function
| C | mit | mcci-catena/arduino-lmic,mcci-catena/arduino-lmic,mcci-catena/arduino-lmic |
3efdee2c137bfa5a8b937fea6616fd3c57eede6a | src/kvazaar_internal.h | src/kvazaar_internal.h | #ifndef KVAZAAR_INTERNAL_H_
#define KVAZAAR_INTERNAL_H_
/*****************************************************************************
* This file is part of Kvazaar HEVC encoder.
*
* Copyright (C) 2013-2015 Tampere University of Technology and others (see
* COPYING file).
*
* Kvazaar is free software: you can redistri... | #ifndef KVAZAAR_INTERNAL_H_
#define KVAZAAR_INTERNAL_H_
/*****************************************************************************
* This file is part of Kvazaar HEVC encoder.
*
* Copyright (C) 2013-2015 Tampere University of Technology and others (see
* COPYING file).
*
* Kvazaar is free software: you can redistri... | Fix compilation warnings when using clang. | Fix compilation warnings when using clang.
Removes typedef redefinitions in kvazaar_internal.h.
| C | bsd-3-clause | lu-zero/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,lu-zero/kvazaar,lu-zero/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,lu-zero/kvazaar |
a5bc4fdc171021daeb92d5d4a6fcf45ed3cad3e6 | Amethyst/AMShortcutsPreferencesViewController.h | Amethyst/AMShortcutsPreferencesViewController.h | //
// AMShortcutsPreferencesViewController.h
// Amethyst
//
// Created by Ian Ynda-Hummel on 4/26/14.
// Copyright (c) 2014 Ian Ynda-Hummel. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <MASPreferences/MASPreferencesViewController.h>
@interface AMShortcutsPreferencesViewController : NSViewController
@... | //
// AMShortcutsPreferencesViewController.h
// Amethyst
//
// Created by Ian Ynda-Hummel on 4/26/14.
// Copyright (c) 2014 Ian Ynda-Hummel. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface AMShortcutsPreferencesViewController : NSViewController
@end
| Remove import from previously-removed MASPreferences | Remove import from previously-removed MASPreferences
| C | mit | ianyh/Amethyst,ianyh/Amethyst,ianyh/Amethyst,ianyh/Amethyst,ianyh/Amethyst |
1c1fe4b476e004017fdfc633ab60b17146f1db80 | stack.h | stack.h | #include <stdlib.h>
#ifndef __STACK_H__
#define __STACK_H__
struct Stack;
typedef struct Stack Stack;
#endif | #include <stdlib.h>
#ifndef __STACK_H__
#define __STACK_H__
struct Stack;
typedef struct Stack Stack;
void Push(Stack s, void* e);
void* Pop(Stack s);
int Stack_Empty(Stack s);
#endif | Add basic operation function declaration | Add basic operation function declaration
| C | mit | MaxLikelihood/CADT |
0fee9081555e6b8a104aa857a29df14712c5fd43 | ext/opengl/gl-ext-3dfx.c | ext/opengl/gl-ext-3dfx.c | /*
* Copyright (C) 2007 Jan Dvorak <jan.dvorak@kraxnet.cz>
*
* This program is distributed under the terms of the MIT license.
* See the included MIT-LICENSE file for the terms of this license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO ... | /*
* Copyright (C) 2007 Jan Dvorak <jan.dvorak@kraxnet.cz>
*
* This program is distributed under the terms of the MIT license.
* See the included MIT-LICENSE file for the terms of this license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO ... | Change remaining glTbufferMask3DFX to an instance method. | Change remaining glTbufferMask3DFX to an instance method.
| C | mit | larskanis/opengl,larskanis/opengl |
815d5c9e041319cbd9660aca9097bfa9c7c257eb | prime.c | prime.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int isPrime(unsigned long x)
{
if (sqrt(x) - (unsigned long)sqrt(x) == 0)
return 0;
for (unsigned long i = 2; i < ceil(sqrt(x)); i++)
if (x % i == 0)
return 0;
return 1;
}
int main( int argc, char** argv)
{
unsigned l... | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int isPrime(unsigned int x)
{
if (sqrt(x) - (unsigned int)sqrt(x) == 0)
return 0;
for (unsigned int i = 2; i < ceil(sqrt(x)); i++)
if (x % i == 0)
return 0;
return 1;
}
int main( int argc, char** argv)
{
unsigned int ... | Replace long with int in the C version to improve performance. | Replace long with int in the C version to improve performance.
| C | bsd-3-clause | noamknispel/ThePrimeBenchMark,noamknispel/ThePrimeBenchMark,noamknispel/ThePrimeBenchMark,noamknispel/ThePrimeBenchMark,noamknispel/ThePrimeBenchMark |
47452ae7c92e4fb03416e1a870a0d586d761f5fa | Utilities/kwsys/testDynload.c | Utilities/kwsys/testDynload.c | #ifdef _WIN32
#define DL_EXPORT __declspec( dllexport )
#else
#define DL_EXPORT
#endif
DL_EXPORT int TestDynamicLoaderData;
DL_EXPORT void TestDynamicLoaderFunction()
{
}
| #ifdef _WIN32
#define DL_EXPORT __declspec( dllexport )
#else
#define DL_EXPORT
#endif
DL_EXPORT int TestDynamicLoaderData = 0;
DL_EXPORT void TestDynamicLoaderFunction()
{
}
| Fix compilation on MacOSX (common symbols not allowed with MH_DYLIB output format) | COMP: Fix compilation on MacOSX (common symbols not allowed with MH_DYLIB output format)
| C | apache-2.0 | eile/ITK,fbudin69500/ITK,wkjeong/ITK,fuentesdt/InsightToolkit-dev,fedral/ITK,stnava/ITK,Kitware/ITK,atsnyder/ITK,CapeDrew/DITK,blowekamp/ITK,InsightSoftwareConsortium/ITK,itkvideo/ITK,eile/ITK,stnava/ITK,LucasGandel/ITK,fedral/ITK,Kitware/ITK,stnava/ITK,itkvideo/ITK,InsightSoftwareConsortium/ITK,daviddoria/itkHoughTran... |
5c4201a37985579b45debc1b9ab51ecf4870c140 | sys/powerpc/include/floatingpoint.h | sys/powerpc/include/floatingpoint.h | /*
* Copyright (c) 2004 Suleiman Souhlal <refugee@segfaulted.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* ... | Add sys file required for IEEE fp functions. | Add sys file required for IEEE fp functions.
Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase | |
614c7ace15046fd016ddcb28f61cb6cf6b30cc05 | test/Preprocessor/has_c_attribute.c | test/Preprocessor/has_c_attribute.c | // RUN: %clang_cc1 -fdouble-square-bracket-attributes -std=c11 -E %s -o - | FileCheck %s
// CHECK: has_fallthrough
#if __has_c_attribute(fallthrough)
int has_fallthrough();
#endif
// CHECK: does_not_have_selectany
#if !__has_c_attribute(selectany)
int does_not_have_selectany();
#endif
| // RUN: %clang_cc1 -fdouble-square-bracket-attributes -std=c11 -E %s -o - | FileCheck %s
// CHECK: has_fallthrough
#if __has_c_attribute(fallthrough)
int has_fallthrough();
#endif
// CHECK: does_not_have_selectany
#if !__has_c_attribute(selectany)
int does_not_have_selectany();
#endif
| Correct line endings that got mixed up in r320088; NFC. | Correct line endings that got mixed up in r320088; NFC.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@320115 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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
9b3814de8a8cbe6fda99174955f7878a5e6189bf | tests/src/test_run.c | tests/src/test_run.c | #include <stdio.h>
#include <stdlib.h>
#include "rxvm.h"
#include "test_common.h"
#include "test_modules.h"
#define NUM_MODS 7
const testmod_t mods[NUM_MODS] = {
test_rxvm_err, test_rxvm_match, test_rxvm_search,
test_rxvm_search_nomatch, test_rxvm_compile, test_fuzz_rxvm_match,
test_fuzz_full_rxv... | #include <stdio.h>
#include <stdlib.h>
#include "rxvm.h"
#include "test_common.h"
#include "test_modules.h"
//#define NUM_MODS 7
#define NUM_MODS 6
const testmod_t mods[NUM_MODS] = {
test_rxvm_err, test_rxvm_match, test_rxvm_search,
test_rxvm_search_nomatch, test_rxvm_compile, test_fuzz_rxvm... | Disable fuzz_full test until fixed | Disable fuzz_full test until fixed
| C | apache-2.0 | eriknyquist/librxvm,eriknyquist/librxvm,eriknyquist/librxvm |
3b6f6fefaa1f13cde4d9530a51e655059f5b15ab | texor.c | texor.c | #include <termios.h>
#include <unistd.h>
void enableRawMode() {
struct termios raw;
tcgetattr(STDIN_FILENO, &raw);
raw.c_lflag &= ~(ECHO);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enableRawMode();
char c;
while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q');
return 0;
}
| #include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enableRawMode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disableRawMode);
struct termios raw = orig_termios;
raw.c_lflag &= ~(... | Disable raw mode when exiting | Disable raw mode when exiting
| C | bsd-2-clause | kyletolle/texor |
15eb88a039cda665d151f6daa280c2ad439c2c84 | BBlock.h | BBlock.h | //
// BBlock.h
// BBlock
//
// Created by David Keegan on 4/10/12.
// Copyright (c) 2012 David Keegan. All rights reserved.
//
#import <Foundation/Foundation.h>
/// For when you need a weak reference of an object, example: `BBlockWeakObject(obj) wobj = obj;`
#define BBlockWeakObject(o) __weak typeof(o)
/// For w... | //
// BBlock.h
// BBlock
//
// Created by David Keegan on 4/10/12.
// Copyright (c) 2012 David Keegan. All rights reserved.
//
#import <Foundation/Foundation.h>
/// For when you need a weak reference of an object, example: `BBlockWeakObject(obj) wobj = obj;`
#define BBlockWeakObject(o) __weak __typeof__((__typeof... | Revert "with Xcode4.4 __weak typeof(o) is all that's needed for weak references" | Revert "with Xcode4.4 __weak typeof(o) is all that's needed for weak references"
This reverts commit 7689903fd592848310bf12743dcec7805cd37098.
| C | mit | kgn/BBlock,cnbin/BBlock,azplanlos/BBlock |
2c454a161bc6f8cbe364c5dc040cf140299b4087 | src/crt/crt1.c | src/crt/crt1.c | #include <stdint.h>
void __wasm_call_ctors(void);
int __argc(void);
void __argv(uintptr_t[static 1]);
void __args(char[static 1]);
int main(int, char**);
void _start(void)
{
int argc = __argc();
char* argv[argc + 1];
__argv((uintptr_t*)argv);
char args[(uintptr_t)argv[argc]];
__args(args);
... | #include <stdint.h>
void __wasm_call_ctors(void);
/*!
* `argc` getter
*
* This function returns 0 if passing arguments to main() is unsupported.
*/
int __argc(void);
/*!
* `argv` builder
*
* This function stores `argv` as offset from `argv[0]`,
* and appends `sizeof(args)`.
*
* For example, if the command ... | Document on getters of argc and argv | Document on getters of argc and argv
| C | mit | jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic |
af6936815f344cab1cd0549172582dfa40dcd46e | infiniteloop_cmd.c | infiniteloop_cmd.c | // Copyright (c) 2016 Ed Schouten <ed@nuxi.nl>
//
// This file is distributed under a 2-clause BSD license.
// See the LICENSE file for details.
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "infiniteloop.h"
static bool print_solution(const struct il_solution *s, void *thunk) {
char buf[1024... | // Copyright (c) 2016 Ed Schouten <ed@nuxi.nl>
//
// This file is distributed under a 2-clause BSD license.
// See the LICENSE file for details.
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "infiniteloop.h"
static unsigned int solutions_found = 0;
static bool print_solution(const struct il_s... | Print the number of solutions. | Print the number of solutions.
| C | bsd-2-clause | EdSchouten/infiniteloop,EdSchouten/infiniteloop |
c7b9219474aaa208b8063241d18d9d6cb3e1ad2e | include/MHClientSecret.h | include/MHClientSecret.h | //
// MHClientSecret.h
// MyHub
//
// Created by Arcterus on 1/14/14.
// Copyright (c) 2014 kRaken Research. All rights reserved.
//
#ifndef MyHub_MHClientSecret_h
#define MyHub_MHClientSecret_h
#define CLIENT_ID "1234567890"
#define CLIENT_SECRET "1234567890abcdef"
#endif
| Add file with dummy client info | Add file with dummy client info
| C | mpl-2.0 | Arcterus/MyHub | |
e8b78e79fe13f170083ba89b48b1c18bd3c93543 | Mac/Python/macguesstabsize.c | Mac/Python/macguesstabsize.c | #include <MacHeaders>
#include <string.h>
/* Interface used by tokenizer.c */
guesstabsize(path)
char *path;
{
char s[256];
int refnum;
Handle h;
int tabsize = 0;
s[0] = strlen(path);
strncpy(s+1, path, s[0]);
refnum = OpenResFile(s);
/* printf("%s --> refnum=%d\n", path, refnum); */
if (refnum == -1)
retu... | #include <Types.h>
#include <Files.h>
#include <OSUtils.h>
#include <Resources.h>
#include <string.h>
/* Interface used by tokenizer.c */
guesstabsize(path)
char *path;
{
char s[256];
int refnum;
Handle h;
int tabsize = 0;
s[0] = strlen(path);
strncpy(s+1, path, s[0]);
refnum = OpenResFile(s);
/* printf("%s ... | Replace <MacHeaders> by specific required header files | Replace <MacHeaders> by specific required header files
| C | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator |
16a70daa90a743729ece6bb7ecd971a55ebe4731 | link-grammar/lg_assert.h | link-grammar/lg_assert.h | /* There is no include guard here - by purpose. This file can be included
* after system includes that redefine the assert() macro.
* The actual problem for which this file got separated from utilities.h
* happens in the sat-solver code, when local include files include
* Solver.h which in turn includes the system'... | /* There is no include guard here - by purpose. This file can be included
* after system includes that redefine the assert() macro.
* The actual problem for which this file got separated from utilities.h
* happens in the sat-solver code, when local include files include
* Solver.h which in turn includes the system'... | Use fprintf() to ensure message printing | assert(): Use fprintf() to ensure message printing
If prt_error() is used and the error facility uses a non-default error
handler, the message will get lost.
| C | lgpl-2.1 | ampli/link-grammar,opencog/link-grammar,linas/link-grammar,linas/link-grammar,opencog/link-grammar,opencog/link-grammar,linas/link-grammar,opencog/link-grammar,opencog/link-grammar,ampli/link-grammar,linas/link-grammar,ampli/link-grammar,opencog/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,... |
d58d382cd1d01bc048c8bb74b184d182b36a5cfb | Application/voRemoteAnalysisConnectionDialog.h | Application/voRemoteAnalysisConnectionDialog.h | /*=========================================================================
Program: Visomics
Copyright (c) Kitware, 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://ww... | /*=========================================================================
Program: Visomics
Copyright (c) Kitware, 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://ww... | Fix copy/paste error in header guard | Fix copy/paste error in header guard
| C | apache-2.0 | Visomics/Visomics,arborworkflows/Visomics,Visomics/Visomics,Visomics/Visomics,arborworkflows/Visomics,Visomics/Visomics,Visomics/Visomics,arborworkflows/Visomics,Visomics/Visomics,arborworkflows/Visomics,arborworkflows/Visomics,arborworkflows/Visomics |
947470b6ae897dd4a340944206c80e39c5e20cc9 | browser/atom_browser_main_parts.h | browser/atom_browser_main_parts.h | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_ATOM_BROWSER_MAIN_PARTS_
#define ATOM_BROWSER_ATOM_BROWSER_MAIN_PARTS_
#include "brightray/browser/browser_main_parts.h"
namespace atom ... | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_ATOM_BROWSER_MAIN_PARTS_
#define ATOM_BROWSER_ATOM_BROWSER_MAIN_PARTS_
#include "brightray/browser/browser_main_parts.h"
namespace atom ... | Mark OS X only implementations in BrowserMainParts. | Mark OS X only implementations in BrowserMainParts.
| C | mit | Jacobichou/electron,michaelchiche/electron,fritx/electron,chrisswk/electron,twolfson/electron,eriser/electron,Jacobichou/electron,John-Lin/electron,gabriel/electron,simonfork/electron,d-salas/electron,aliib/electron,GoooIce/electron,adamjgray/electron,JesselJohn/electron,Faiz7412/electron,ervinb/electron,Floato/electro... |
39e3614c7136029acb6b18cd71e12ef2feaeaac7 | ui/minigraph.h | ui/minigraph.h | #pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class DisassemblyView;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI MiniGraph: public QWidget, public DockCon... | #pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class FlowGraphWidget;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI MiniGraph: public QWidget, public DockCon... | Update MiniGraph to work with FlowGraphWidet. | Update MiniGraph to work with FlowGraphWidet.
| C | mit | Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api |
2b37c13dcf9f8460bf86c4b9096dcc49aed72a44 | src/lib/utils/rotate.h | src/lib/utils/rotate.h | /*
* Word Rotation Operations
* (C) 1999-2008 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#ifndef BOTAN_WORD_ROTATE_H__
#define BOTAN_WORD_ROTATE_H__
#include <botan/types.h>
namespace Botan {
/**
* Bit rotation left
* @param input the input word
* @param rot the number of... | /*
* Word Rotation Operations
* (C) 1999-2008 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#ifndef BOTAN_WORD_ROTATE_H__
#define BOTAN_WORD_ROTATE_H__
#include <botan/types.h>
namespace Botan {
/**
* Bit rotation left
* @param input the input word
* @param rot the number of... | Allow bit rotation by more than sizeof(T)*8 bits. | Allow bit rotation by more than sizeof(T)*8 bits.
Currently these functions will happily bit shift by >= sizeof(T)*8 bits.
However, this is undefined behavior, and results in unexpected results (0)
on at least one platform I've tested.
With this update, you can expect that rotate_left<uint32_t>(1, 32)==1
and rotate_r... | C | bsd-2-clause | randombit/botan,webmaster128/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,Rohde-Schw... |
5fffb9f49cd7b1237a0bfed0faebf16ef5cdeec1 | lib/sanitizer_common/sanitizer_platform_interceptors.h | lib/sanitizer_common/sanitizer_platform_interceptors.h | //===-- sanitizer_platform_interceptors.h -----------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===-- sanitizer_platform_interceptors.h -----------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Disable scanf interceptor on windows. | [sanitizer] Disable scanf interceptor on windows.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@173037 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 |
06b2610307b76c594aa544e8366b291571b4e3e8 | Classes/model/NearbyObjectProtocol.h | Classes/model/NearbyObjectProtocol.h | //
// NearbyObjectProtocol.h
// ARIS
//
// Created by Brian Deith on 5/15/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
enum {
NearbyObjectNPC = 1,
NearbyObjectItem = 2,
NearbyObjectNode = 3
};
typedef UInt32 nearbyObjectKind;
@protocol NearbyObjectProtocol
- (NSString *)name;
- (nearb... | Include nearby object protocol file | Include nearby object protocol file
| C | mit | ARISGames/iOSClient,ARISGames/iOSClient,ARISGames/iOSClient,ARISGames/iOSClient,ARISGames/iOSClient | |
9acecbbff3b0eca30b2a0f0767dad196b93d1225 | 3RVX/Settings.h | 3RVX/Settings.h | #pragma once
#include <unordered_map>
#include <string>
#include "TinyXml2\tinyxml2.h"
class Skin;
#define SETTINGS_APP L"SettingsUI.exe"
class Settings {
public:
static Settings *Instance();
static std::wstring AppDir();
static std::wstring SettingsApp();
std::wstring LanguagesDir();
std::ws... | #pragma once
#include <unordered_map>
#include <string>
#include "TinyXml2\tinyxml2.h"
class Skin;
#define SETTINGS_APP L"SettingsUI.exe"
class Settings {
public:
static Settings *Instance();
void Reload();
static std::wstring AppDir();
static std::wstring SettingsApp();
std::wstring Language... | Reorganize and reduce visibility for raw XML access methods | Reorganize and reduce visibility for raw XML access methods
These should be performed by public methods that abstract away the XML elements
| C | bsd-2-clause | malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,malensek/3RVX |
9e016003aac70a33c442a81cd1eb7c51c3fa52b6 | deps/test/openblas/test_install.c | deps/test/openblas/test_install.c | #include <cblas.h>
#include <stdio.h>
void main()
{
double A[ 6 ] = { 1.0, 2.0, 1.0, -3.0, 4.0, -1.0 };
double B[ 6 ] = { 1.0, 2.0, 1.0, -3.0, 4.0, -1.0 };
double C[ 9 ] = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
int i = 0;
cblas_dgemm( CblasColMajor, CblasNoTrans, CblasTrans, 3, 3, 2, 1, A, 3, B, 3, 2, ... | Add script to test install | Add script to test install
| C | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | |
e891c048cd3bd65cd80ef15097a7b092b41d9449 | tests/regression/36-octapron/14-traces-unprot.c | tests/regression/36-octapron/14-traces-unprot.c | // PARAM: --sets ana.activated[+] octApron
#include <pthread.h>
#include <assert.h>
int g = 1;
void *t_fun(void *arg) {
g = 2; // write something non-initial so base wouldn't find success
return NULL;
}
int main(void) {
int x, y;
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
x = g;
y = g;
/... | Add regression test where unprotected read must forget relation | Add regression test where unprotected read must forget relation
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | |
74ce9a97e81b913f26f0353dc0d3e988af99cb5c | uranus_dp/include/uranus_dp/eigen_helper.h | uranus_dp/include/uranus_dp/eigen_helper.h | #ifndef EIGEN_HELPER_H
#define EIGEN_HELPER_H
#include <Eigen/Dense>
template<typename Derived>
inline bool isFucked(const Eigen::MatrixBase<Derived>& x)
{
return !((x.array() == x.array())).all() && !( (x - x).array() == (x - x).array()).all();
}
#endif
| #ifndef EIGEN_HELPER_H
#define EIGEN_HELPER_H
#include "ros/ros.h"
#include <Eigen/Dense>
template<typename Derived>
inline bool isFucked(const Eigen::MatrixBase<Derived>& x)
{
return !((x.array() == x.array())).all() && !( (x - x).array() == (x - x).array()).all();
}
inline Eigen::MatrixXd getMatrixParam(ros::Nod... | Move more stuff to eigen helper header | Move more stuff to eigen helper header
| C | mit | vortexntnu/rov-control,vortexntnu/rov-control,vortexntnu/rov-control |
3881c6907e3a18dca7878e06ef915e64021156b0 | test/Analysis/taint-generic.c | test/Analysis/taint-generic.c | // RUN: %clang_cc1 -analyze -analyzer-checker=experimental.security.taint,experimental.security.ArrayBoundV2 -verify %s
int scanf(const char *restrict format, ...);
int getchar(void);
#define BUFSIZE 10
int Buffer[BUFSIZE];
void bufferFoo1(void)
{
int n;
scanf("%d", &n);
Buffer[n] = 1; // expected-warning {{O... | // RUN: %clang_cc1 -analyze -analyzer-checker=experimental.security.taint,experimental.security.ArrayBoundV2 -verify %s
int scanf(const char *restrict format, ...);
int getchar(void);
#define BUFSIZE 10
int Buffer[BUFSIZE];
void bufferScanfDirect(void)
{
int n;
scanf("%d", &n);
Buffer[n] = 1; // expected-warn... | Add more simple taint tests. | [analyzer] Add more simple taint tests.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@145275 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
ad5e1f815335f65c20b07ed10cdac2885202a47c | include/llvm/CodeGen/ValueTypes.h | include/llvm/CodeGen/ValueTypes.h | //===- CodeGen/ValueTypes.h - Low-Level Target independ. types --*- C++ -*-===//
//
// This file defines the set of low-level target independent types which various
// values in the code generator are. This allows the target specific behavior
// of instructions to be described to target independent passes.
//
//===---... | Define target value types in a form usable by target-independent code | Define target value types in a form usable by target-independent code
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@7375 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/l... | |
6346f9be0ecd911c67e523d8eb765bf84cd1dea6 | src/common.h | src/common.h | // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is governed
// by a BSD license that can be found in the LICENSE file.
#ifndef SCALLOC_COMMON_H_
#define SCALLOC_COMMON_H_
#define UNLIKELY(x) __builtin_expect((x), 0)
... | // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is governed
// by a BSD license that can be found in the LICENSE file.
#ifndef SCALLOC_COMMON_H_
#define SCALLOC_COMMON_H_
#define UNLIKELY(x) __builtin_expect((x), 0)
... | Add CompilerBarrier() and MemoryBarrier() functions. | Add CompilerBarrier() and MemoryBarrier() functions.
Signed-off-by: Michael Lippautz <0d543840881a2c189b4f7636b15eebd6a8f60ace@gmail.com>
| C | bsd-2-clause | cksystemsgroup/scalloc,cksystemsgroup/scalloc,cksystemsgroup/scalloc |
9fb5888c9c8de8c942f5524c3857f8186c2edc6d | input.c | input.c | #include "input.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
void read_line(char *p)
{
if (fgets(p, MAX_SIZE, stdin) == NULL){
p[0] = '\0';
return;
}
remove_space(p);
}
int is_exit(const char* p)
{
const char* exit_words[] = {
"exit",
"quit",
"b... | #include "input.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
void read_line(char *p)
{
if (fgets(p, MAX_SIZE, stdin) == NULL){
p[0] = '\0';
return;
}
remove_space(p);
}
int is_exit(const char* p)
{
const char* exit_words[] = {
"",
"exit",
"quit"... | Add empty string to exit words | Add empty string to exit words
| C | mit | Roadagain/Calculator,Roadagain/Calculator |
48f0a31143545af70b16b4ff079cc255acdf9419 | alura/c/forca.c | alura/c/forca.c | #include <stdio.h>
int main() {
int notas[10];
notas[0] = 10;
notas[2] = 9;
notas[3] = 8;
notas[9] = 4;
printf("%d %d %d\n", notas[0], notas[2], notas[9]);
} | #include <stdio.h>
int main() {
char palavrasecreta[20];
sprintf(palavrasecreta, "MELANCIA");
printf("%s\n", palavrasecreta);
/*
palavrasecreta[0] = 'M';
palavrasecreta[1] = 'E';
palavrasecreta[2] = 'L';
palavrasecreta[3] = 'A';
palavrasecreta[4] = 'N';
palavrasecreta[5] = 'C';
palavrasecreta[... | Update files, Alura, Introdução a C - Parte 2, Aula 2.2 | Update files, Alura, Introdução a C - Parte 2, Aula 2.2
| C | mit | fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs |
a7f3d5712d54ae80ca6a2a747522f8ae65c0ed98 | webkit/glue/form_data.h | webkit/glue/form_data.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 WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.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 WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
... | Add a default constructor for FormData. There are too many places that create FormDatas, and we shouldn't need to initialize user_submitted for each call site. | AutoFill: Add a default constructor for FormData. There are too many places
that create FormDatas, and we shouldn't need to initialize user_submitted for
each call site.
BUG=50423
TEST=none
Review URL: http://codereview.chromium.org/3074023
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@54641 4ff67af0-8c30-449... | 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 |
c840bf5d4905d023d6495550759bc9cf08bb3aa3 | test/main.c | test/main.c |
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
#include <stdio.h>
int main(int argc, char** argv)
{
if (argc < 2)
{
printf("err\n");
return -1;
}
FILE* f = fopen(argv[1], "rb");
if (!f)
{
return -2;
}
fseek(f, 0, SEEK_END);
long size = ftell(f);
fseek(f, 0, SEEK_SET);
void* buf = malloc(size... |
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
#include <stdio.h>
int main(int argc, char** argv)
{
if (argc < 2)
{
printf("err\n");
return -1;
}
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_result result = cgltf_parse_file(&options, argv[1], &data);
if (result == cgltf_result_succes... | Add cgltf_parse_file and cgltf_load_buffers to test program | Add cgltf_parse_file and cgltf_load_buffers to test program
With this CI tests will run almost all of the code on glTF sample models
- this will validate that the code that loads external buffers and
parses Base64 data URIs is correct.
| C | mit | jkuhlmann/cgltf,jkuhlmann/cgltf,jkuhlmann/cgltf |
1c284ac5ec72c86b9ed787b3f4e1a6978c919370 | lib/Target/PowerPC/PPCTargetMachine.h | lib/Target/PowerPC/PPCTargetMachine.h | //===-- PPC32TargetMachine.h - PowerPC/Darwin TargetMachine ---*- 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.
//
//===------------... | //===-- PPC32TargetMachine.h - PowerPC/Darwin TargetMachine ---*- 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.
//
//===------------... | Remove an unneeded header and forward declaration | Remove an unneeded header and forward declaration
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@15722 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swif... |
27206db97255a92a96619810727c8bb03e7907e0 | Globals.h | Globals.h | /*
Mace - http://www.macehq.cx
Copyright 1999-2004
See the file README for more information
*/
#ifndef GLOBALS_H
#define GLOBALS_H
#ifndef _MaceTypes
#define _MaceTypes
typedef unsigned char U8;
typedef char S8;
typedef unsigned short U16;
typedef signed short S16;
//Note: on 64-bit machines, replace "long" wi... | /*
Mace - http://www.macehq.cx
Copyright 1999-2004
See the file README for more information
*/
#ifndef GLOBALS_H
#define GLOBALS_H
#ifndef _MaceTypes
#define _MaceTypes
typedef unsigned char U8;
typedef signed char S8;
typedef unsigned short U16;
typedef signed short S16;
//Note: on 64-bit machines, replace "l... | Fix U32 and S32 on LP64 architectures. | Fix U32 and S32 on LP64 architectures.
| C | lgpl-2.1 | MaddTheSane/Mace,MaddTheSane/Mace |
3b78d640bae703c1c5c88c8e87f313d30f58249b | tests/regression/31-ikind-aware-ints/09-signed-negate.c | tests/regression/31-ikind-aware-ints/09-signed-negate.c | //PARAM: --disable ana.int.interval --enable ana.int.wrap_on_signed_overflow
#include <assert.h>
int main(){
int a = 0;
// maximum value for long long
signed long long s = 9223372036854775807;
assert(s > 9223372036854775806);
signed long long t = s + 2;
// Signed overflow - The following asse... | Add test for signed wrap-around with ana.int.wrap_on_signed_overflow | Add test for signed wrap-around with ana.int.wrap_on_signed_overflow
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | |
219edae4202ef451a3d084a4678c0cf861ccff0a | testsuite/breakdancer/disable_optimize.h | testsuite/breakdancer/disable_optimize.h | /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#ifndef DISABLE_OPTIMIZE_H
#define DISABLE_OPTIMIZE_H 1
/* avoid wasting time trying to optimize those countless test functions */
#if defined(__clang__)
/*
* Works for Alk since clang-3.5.
* Unfortunately it looks like Apple have their ... | /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#ifndef DISABLE_OPTIMIZE_H
#define DISABLE_OPTIMIZE_H 1
/* According to MB-11846 we have some misconfigured vm's unable to
* compile the source code without enabling optimization. Add a workaround
* for those vm's until they're fixed
*/
#... | Add workaround for broken builders | MB-11846: Add workaround for broken builders
According to MB-11846 we have some misconfigured vm's unable to
compile the source code without enabling optimization. This
patch introduce a workaround to enable the optimization of the
breakdancer tests until the vm's is fixed. To use the workaround
define COUCHBASE_OPTIM... | C | bsd-3-clause | jimwwalker/memcached,daverigby/kv_engine,couchbase/memcached,cloudrain21/memcached-1,cloudrain21/memcached-1,daverigby/kv_engine,couchbase/memcached,cloudrain21/memcached-1,daverigby/kv_engine,cloudrain21/memcached-1,mrkwse/memcached,daverigby/memcached,daverigby/memcached,owendCB/memcached,owendCB/memcached,daverigby/... |
d8462d5c45ef1ae42d19bb0ade365b8017282228 | cpp/module_impl.h | cpp/module_impl.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 PPAPI_CPP_MODULE_IMPL_H_
#define PPAPI_CPP_MODULE_IMPL_H_
#include "ppapi/cpp/module.h"
namespace {
template <typename T> class DeviceFuncs... | // 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 PPAPI_CPP_MODULE_IMPL_H_
#define PPAPI_CPP_MODULE_IMPL_H_
#include "ppapi/cpp/module.h"
namespace {
template <typename T> class DeviceFuncs... | Initialize DeviceFuncs::ifuncs_ to zero in constructor | Initialize DeviceFuncs::ifuncs_ to zero in constructor
| C | bsd-3-clause | humanai/ppapi,LinRaise/ppapi,Iwan12/ppapi,lio972/ppapi,macressler/ppapi,iofcas/ppapi,kaijajan/ppapi,Iwan12/ppapi,LinRaise/ppapi,thecocce/ppapi,jmnjmn/ppapi,melchi45/ppapi,johnnnylm/ppapi,melchi45/ppapi,johnnnylm/ppapi,melchi45/ppapi,Iwan12/ppapi,macressler/ppapi,Iwan12/ppapi,johnnnylm/ppapi,lio972/ppapi,kaijajan/ppapi,... |
cfc80a8794b405ccc2127fe6fa52100fe5cfcdfd | wocky/wocky-namespaces.h | wocky/wocky-namespaces.h |
#define WOCKY_XMPP_NS_STREAM \
(const gchar *)"http://etherx.jabber.org/streams"
#define WOCKY_XMPP_NS_TLS \
(const gchar *)"urn:ietf:params:xml:ns:xmpp-tls"
#define WOCKY_XMPP_NS_SASL_AUTH \
(const gchar *)"urn:ietf:params:xml:ns:xmpp-sasl"
|
#define WOCKY_XMPP_NS_STREAM \
(const gchar *)"http://etherx.jabber.org/streams"
#define WOCKY_XMPP_NS_TLS \
(const gchar *)"urn:ietf:params:xml:ns:xmpp-tls"
#define WOCKY_XMPP_NS_SASL_AUTH \
(const gchar *)"urn:ietf:params:xml:ns:xmpp-sasl"
#define WOCKY_XMPP_NS_XHTML_IM \
(const gchar *)"http://jabber.org... | Add xhtml-im and w3c xhtml namespace | Add xhtml-im and w3c xhtml namespace
20070316212630-93b9a-bcdbd042585561b0f20076b5e7f5f1c41c1e2867.gz
| C | lgpl-2.1 | freedesktop-unofficial-mirror/wocky,noonien-d/wocky,freedesktop-unofficial-mirror/wocky,freedesktop-unofficial-mirror/wocky,noonien-d/wocky,noonien-d/wocky |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.