conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add max length error check\n" }, { "from": "human", "value": "/* metatag.c: Program for adding metadata to a file\n * By: Forrest Kerslager, Nick Noto, David Taylor, Kevin Yeap,\n * Connie Yu\n * \n * 2014/06/06\n * */\n\n#include <stdio.h>\n#include <stdlib.h>\...
c
chosen
[ { "from": "system", "value": "Fix one more register addressing bug\n" }, { "from": "human", "value": "// Offset of each register in the register map,\n// as it's saved by asm_entry_amd64.s\n\n#pragma once\n\n#define RAX 0x00\n#define RBX 0x08\n#define RCX 0x10\n#define RDX 0x18\n#define RSI 0x20...
c
chosen
[ { "from": "system", "value": "Hide a static function to CINT. With this fix g4root compiles OK.\n\n\ngit-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@18737 27541ba8-7e3a-0410-8455-c3a389f83636\n" }, { "from": "human", "value": "// @(#)root/base:$Name: $:$Id: TVersionCheck.h,v 1.2 2007/05/10...
c
chosen
[ { "from": "system", "value": "Fix braindamage: assertions were not enabled in debug builds.\n" }, { "from": "human", "value": "#ifndef ERROR_H\n#define ERROR_H\n\n/*\n * Note that we include \"fmt\" in the variadic argument list, because C99\n * apparently doesn't allow variadic macros to be inv...
c
chosen
[ { "from": "system", "value": "Add nullptr check and return NULL for implicitor operator when object is not initialized\n" }, { "from": "human", "value": "// Copyright 2010-2014 The CefSharp Authors. All rights reserved.\n//\n// Use of this source code is governed by a BSD-style license that can...
c
chosen
[ { "from": "system", "value": "Add NULL_BYTE macro, rename others\n" }, { "from": "human", "value": "/**\n * common.h\n *\n * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com>\n */\n\n#ifndef GIT_STASHD_COMMON_H\n#define GIT_STASHD_COMMON_H\n\n#include <errno.h>\n#include <stddef.h>\n#inc...
c
chosen
[ { "from": "system", "value": "Check xmain() return code in tests.\n" }, { "from": "human", "value": "\n#ifndef __CMPTEST_H__\n#define __CMPTEST_H__\n\n#include <stdio.h>\n\n#include \"sodium.h\"\n\n#define TEST_NAME_RES TEST_NAME \".res\"\n#define TEST_NAME_OUT TEST_SRCDIR \"/\" TEST_NAME \".exp...
c
chosen
[ { "from": "system", "value": "[profile] Remove quotes around env variable, NFC\n\ngit-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@264824 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: %clang_profgen -o %t -O3 %s\n// RUN: env LLVM_PROFILE_FILE=\"%t/\" LLVM_PR...
c
chosen
[ { "from": "system", "value": "Fix HLS being seen as input during init\n" }, { "from": "human", "value": "#include \"output_http.h\"\n#include \"output_ts_base.h\"\n\nnamespace Mist{\n class OutHLS : public TSOutput{\n public:\n OutHLS(Socket::Connection &conn);\n ~OutHLS();\n static v...
c
chosen
[ { "from": "human", "value": "[ARM] 5499/1: Add Usb register controller header file dfine\n\nAdd Usb register controller header file dfine.\nw90p910 usb ip is standard,but some mutifunction\ncontroll pin must be special define in w90p910\n\nSigned-off-by: Wan ZongShun <7d90017055ae88f9b614c1a99b7a29176cffa72...
c
chosen
[ { "from": "system", "value": "Add NOSKILL skill type, remove from component\n\nThe component will be going into a MultiComponentManager, so it will already be indexed by skill_t; storing skill_t in the component as well is redundant, unnecessary, and redundant.\n" }, { "from": "human", "value": ...
c
chosen
[ { "from": "system", "value": "Add TMCVerbose to the list of mc classes\n\n\ngit-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@6190 27541ba8-7e3a-0410-8455-c3a389f83636\n" }, { "from": "human", "value": "// @(#)root/mc:$Name: $:$Id: LinkDef.h,v 1.2 2002/04/26 08:46:10 brun Exp $\n#ifdef __CIN...
c
chosen
[ { "from": "system", "value": "Set up IDT first to ensure exceptions are handled\n" }, { "from": "human", "value": "#include <stdint.h>\n#include \"ports.h\"\n#include \"pic.h\"\n#include \"gdt.h\"\n#include \"idt.h\"\n#include \"irq.h\"\n#include \"screen.h\"\n\nvoid entry(void) {\n\tpic_remap(I...
c
chosen
[ { "from": "system", "value": "Convert to `git branch` for performance\n\n - Using `git status` is eificient to get only the current branch but in\n a repo with a large number of untracked files it can stall for a long\n time getting the status of a repository. Git Branch is much better in\n these case...
c
chosen
[ { "from": "system", "value": "Format strings and more through test for stack floats\n" }, { "from": "human", "value": "// RUN: %ucc -o %t %s\n// RUN: %ocheck 0 %t\n// RUN: %t | %output_check 'Hello 5 2.3' 'Hello 5 2.3'\n\n// should run without segfaulting\nmain()\n{\n\tprintf(\"Hello %d %.1f\\n\...
c
chosen
[ { "from": "system", "value": "Fix differing parameter name clang tidy warning\n" }, { "from": "human", "value": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\...
c
chosen
[ { "from": "system", "value": "Increase the minimum interval for timers on background tabs to reduce\ntheir CPU consumption.\n\nThe new interval is 1000 ms, or once per second. We can easily adjust\nthis value up or down, but this seems like a reasonable value to judge\nthe compatibility impact of this chang...
c
chosen
[ { "from": "system", "value": "Remove defunct missing defs that interfere with CI build" }, { "from": "human", "value": "/* \n * mswin32_config.h\tHand made MSWin32 configuration file.\n *\tCopyright (c) 1996 Applied Logic Systems, Inc.\n *\n * Author:\tChuck Houpt\n * Creation:\t1/30/96\n */\...
c
chosen
[ { "from": "system", "value": "Revert 80939 - Fix clang error\nTBR=jam@chromium.org\n\ngit-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@80954 4ff67af0-8c30-449e-8e8b-ad334ec8d88c\n" }, { "from": "human", "value": "// Copyright (c) 2011 The Chromium Authors. All rights reserved.\n// Use of thi...
c
chosen
[ { "from": "human", "value": "Add separate file for nx_ieee_eui64, since tinyos-main is unable to support it.\n" }, { "from": "gpt", "value": "/**\n * Struct for IEEE EUI64 with network byte order and nx_structs.\n *\n * @author Raido Pahtma\n * @license MIT\n */\n#ifndef NXIEEEEUI64_H\n#define N...
c
chosen
[ { "from": "system", "value": "Add missing extern to variable in header\n\nThis missing extern causes following error in OSX:\n\n```log\n...\n2403 warnings generated.\n CXXLD libgroonga.la\nduplicate symbol _GRN_REPORT_INDEX_LOG_LEVEL in:\n .libs/db.o\n .libs/expr.o\nduplicate symbol _GRN_REPORT_IN...
c
chosen
[ { "from": "human", "value": "Add the thread specific class.\n" }, { "from": "gpt", "value": "/**\n * \\file thread_specific.h\n *\n * A thread specific type.\n *\n * \\author eaburns\n * \\date 2009-07-23\n */\n\n#if !defined(_THREAD_SPECIFIC_H_)\n#define _THREAD_SPECIFIC_H_\n\n#include <vector>...
c
chosen
[ { "from": "system", "value": "Remove an unneeded forward declaration.\n\nBUG=457769\nR=pkasting@chromium.org,rockot@chromium.org\n\nReview URL: https://codereview.chromium.org/930493002\n\nCr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#316348}\n" }, { "from": "human", "value": "/...
c
chosen
[ { "from": "system", "value": "Make gcc4 happy as well\n" }, { "from": "human", "value": "/* vi: set sw=4 ts=4: */\n/*\n * getgid() for uClibc\n *\n * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>\n *\n * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.\n */\n...
c
chosen
[ { "from": "system", "value": "Use Foundation to resolve macros instead of UIKit\n" }, { "from": "human", "value": "//\n// Marshal.h\n// Marshal\n//\n// Created by Jason Larsen on 2/24/16.\n// Copyright © 2016 Utah iOS & Mac. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n//! Project ...
c
chosen
[ { "from": "system", "value": "Define the method updateNotification in meetingbussiness\n" }, { "from": "human", "value": "//\n// IMeetingDelegate.h\n// MeetingApp\n//\n// Created by Estefania Chavez Guardado on 2/27/16.\n// Copyright © 2016 Estefania Chavez Guardado. All rights reserved.\n//...
c
chosen
[ { "from": "system", "value": "Add the printf format attribute to backend_exception's constructor\n" }, { "from": "human", "value": "#ifndef ALEXCPT_H\n#define ALEXCPT_H\n\n#include <exception>\n#include <string>\n\n#include \"AL/alc.h\"\n\n\nnamespace al {\n\nclass backend_exception final : publ...
c
chosen
[ { "from": "human", "value": "Add failing test case with max u long long\n" }, { "from": "gpt", "value": "// PARAM: --conf=conf/svcomp21.json\n// from: ldv-linux-3.0/usb_urb-drivers-vhost-vhost_net.ko.cil.out.i\ntypedef unsigned long long u64;\n\nint main( )\n{ u64 a ;\n unsigned long flag ;\n ...
c
chosen
[ { "from": "human", "value": "Add a clang test for r257376 (Ensure -mcpu=xscale works for arm targets).\n\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@257509 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "gpt", "value": "// RUN: %clang -target arm-freebsd -mcpu=xscale -### -c %s...
c
chosen
[ { "from": "system", "value": "Update sync method docs in IssueSyncEngine" }, { "from": "human", "value": "//\n// CDZIssueSyncEngine.h\n// thingshub\n//\n// Created by Chris Dzombak on 1/13/14.\n// Copyright (c) 2014 Chris Dzombak. All rights reserved.\n//\n\n#import <ReactiveCocoa/ReactiveCo...
c
chosen
[ { "from": "system", "value": "Fix large number of syntax errors (at least for gcc).\n\nsvn path=/trunk/; revision=6508\n" }, { "from": "human", "value": "/* Auxiliary program: write the include file for determining\n PLplot's floating-point type\n*/\n\n#include <stdio>\n#include <stdlib>\n#inc...
c
chosen
[ { "from": "system", "value": "Add dummy static version of getcwd for Aibo.\n\n\t* include/libport/unistd.h: Here." }, { "from": "human", "value": "#ifndef LIBPORT_UNISTD_H\n# define LIBPORT_UNISTD_H\n\n# include \"detect_win32.h\"\n\n# include \"libport/config.h\"\n\n// This is traditional Unix ...
c
chosen
[ { "from": "system", "value": "Support running from the OSS fonts\n" }, { "from": "human", "value": "#import \"NSManagedObject+ActiveRecord.h\"\n#import \"NSString+StringBetweenStrings.h\"\n#import <Artsy+UIColors/UIColor+ArtsyColors.h>\n#import \"UIColor+FolioColours.h\"\n#import <Artsy+UIFonts/...
c
chosen
[ { "from": "system", "value": "Test commit merges feature to master\n" }, { "from": "human", "value": "file4.c - r1\nTest checkin in master1-updated - updated_by_master\nTest checkin in master2\nTest checkin in master3\nTest checkin in master4\n\n\n" }, { "from": "gpt", "value": "Test...
c
chosen
[ { "from": "system", "value": "Add include for GreedyPatternRewriteDriver implementation.\n\nNot sure if this is correct. There was an unresolved symbol error on MSVC that this fixes though.\n" }, { "from": "human", "value": "// Copyright 2021 The IREE Authors\n//\n// Licensed under the Apache Li...
c
chosen
[ { "from": "system", "value": "Change DHT22 sensor sample rate to 20 seconds\n\n3 seconds is used for debug purpose\n" }, { "from": "human", "value": "#pragma once\n\n#define DHT22_PIN 6\n#define DHT22_SAMPLE_RATE 3000\n\n#define TEMPORATURE_TARGET (204)\n\n#define HEATER_PIN 10\n#define HEATER_A...
c
chosen
[ { "from": "system", "value": "Change signatures of methods and fields of class\n" }, { "from": "human", "value": "#ifndef VECTOR_3D_H\n#define VECTOR_3D_H\n\n#include <math.h>\n\nnamespace classes {\n\tstruct Point3D {\n\t\tdouble x, y, z;\n\t};\n\n\tclass Vector3D {\n\t\tstruct Cheshire;\n\t\tC...
c
chosen
[ { "from": "human", "value": "Add first example! (Hello World)\n" }, { "from": "gpt", "value": "/**\n * Exemplo 01 - Hello World!\n * \n * Este é o exemplo mais simples da linguagem C. Consiste apenas em um programa que\n * imprime a mensagem \"Hello World!\" e termina sua execução.\n * Apesar de...
c
chosen
[ { "from": "system", "value": "Return answer when reading formula was finished\n" }, { "from": "human", "value": "#include \"calc.h\"\n\n#include <ctype.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint calc(const char* p)\n{\n int i;\n int ans;\n\n ans = atoi(p);\n i = 0;\n while...
c
chosen
[ { "from": "human", "value": "Support for system \"power profiles\". Currently we support two profiles;\n\"economy\" and \"performance\".\n" }, { "from": "gpt", "value": "/*-\n * Copyright (c) 2001 Michael Smith\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, ...
c
chosen
[ { "from": "system", "value": "Increment timer ticks for now\n" }, { "from": "human", "value": "/* OSEKOS Implementation of an OSEK Scheduler\n * Copyright (C) 2015 Joakim Plate\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser G...
c
chosen
[ { "from": "system", "value": "Work around a circular dependency between IR and MC introduced in r362735\n\nI replaced the circular library dependency with a forward declaration,\nbut it is only a workaround, not a real fix.\n\ngit-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@362782 91177308-0d34-0410-b5...
c
chosen
[ { "from": "human", "value": "DebugInfo: Add a clang test for LLVM fix for PR23332\n\nAdd a clang test for LLVM r235955, which added support for up to 2^16\narguments.\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@235956 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "gpt", "value...
c
chosen
[ { "from": "human", "value": "Implement Linked List in C\n\nC언어로 오랫만에 구현\n수업시간에 이중포인터를 설명하기 위해서 구현했다.\n" }, { "from": "gpt", "value": "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\ntypedef struct Node Node;\nstruct Node {\n\tint value;\n\tNode *next;\n};\n\nvoid addFirst(Node **...
c
chosen
[ { "from": "system", "value": "Move comment to the code it comments on\n" }, { "from": "human", "value": "/**\n * Generic reservoir sampling.\n */\n\n#ifndef _RS_H\n#define _RS_H\n\n/* print actions to the reservoir */\n#ifndef PRINT_RS_TRACE\n#define PRINT_RS_TRACE 1\n#endif\n\nstruct reservoir;...
c
chosen
[ { "from": "system", "value": "Update Doxygen documentation with conventions\n" }, { "from": "human", "value": "/***************************************************************************//**\n* \\file domain.h\n* \\author Krishnan, A. (anush@bu.edu)\n* \\brief Definition of the class \\c domain...
c
chosen
[ { "from": "system", "value": "Fix linking in Objective–C++ tests.\n\nAs detailed in #238, linking tests sometimes fails when OCMock is being used in Objective-C++ (.mm) test case files.\nThis commit solves that problem by conditionally declaring `OCMMakeLocation` as `extern C` in when included in a C++ comp...
c
chosen
[ { "from": "system", "value": "Change \"getmembyte\" and \"getmemword\" to inline functions\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2012, Nadir Sampaoli\n * See the LICENSE for more information\n */\n\n#include \"memory.h\"\n#include <stdlib.h>\n#include <stdio.h>\n\nstatic uint8_...
c
chosen
[ { "from": "system", "value": "Revert \"Name these protocol method variables better\"\n\nThis reverts commit 0dc63736e1b8398d1fc9692473f285076aa862ee.\n" }, { "from": "human", "value": "//\n// GLGInputParserDelegate.h\n// TwIRCk\n//\n// Created by Tim Jarratt on 11/29/13.\n// Copyright (c) 20...
c
chosen
[ { "from": "system", "value": "Cut space required for IDT in half\n" }, { "from": "human", "value": "#ifndef IDT_H\n#define IDT_H\n\n#include <stdint.h>\n\nstruct IDTEntry {\n\tuint16_t base_address_low;\n\tuint16_t selector;\n\tuint8_t reserved;\n\tuint8_t type : 4;\n\tuint8_t storage_segment : ...
c
chosen
[ { "from": "human", "value": "Add beginnings of DB layer.\n" }, { "from": "gpt", "value": "// Copyright 2016 Ben Trask\n// MIT licensed (see LICENSE for details)\n\n#include <kvstore/db_schema.h>\n\nenum {\n\tharc_timeid_to_entry = 20,\n\tharc_url_timeid = 21,\n\tharc_hash_timeid = 50,\n};\n\n#de...
c
chosen
[ { "from": "system", "value": "Change bool true/false to enum\n" }, { "from": "human", "value": "/*\n * types.h\n *\n * Created on: Mar 11, 2014\n * Author: Chase\n */\n\n#ifndef TYPES_H_\n#define TYPES_H_\n\n#include <stdint.h>\n\n//Don't use stdbool.h, we have to make sure bool is only a ...
c
chosen
[ { "from": "system", "value": "Cleanup: Remove unnecessary rounding when allocating initial thread block\n\nThe other calls to __nacl_tls_combined_size() don't do this.\n\n__nacl_tls_combined_size() should be doing any necessary rounding itself.\n\nBUG=none\nTEST=trybots\n\nReview URL: https://codereview.chr...
c
chosen
[ { "from": "system", "value": "Make sure the buffer small read populates the buffer with multiple chunks.\n" }, { "from": "human", "value": "#include <bert/buffer.h>\n\n#include <string.h>\n#include <stdio.h>\n\n#include \"test.h\"\n\n#define DATA_SIZE\t4\n\nint main()\n{\n\tunsigned char data[4]...
c
chosen
[ { "from": "system", "value": "Fix compatibility with all non-Microsoft compilers\n" }, { "from": "human", "value": "/*****************************************************************************\\\n* *\n* Filename \t ...
c
chosen
[ { "from": "system", "value": "Use the same size of lcrq.\n" }, { "from": "human", "value": "#ifndef FIFO_H\n#define FIFO_H\n\n#include \"align.h\"\n\n#define FIFO_NODE_SIZE 510\n\nstruct _fifo_node_t;\n\ntypedef struct DOUBLE_CACHE_ALIGNED {\n volatile size_t enq DOUBLE_CACHE_ALIGNED;\n volati...
c
chosen
[ { "from": "system", "value": "Drop $Id$ and update copyright\n" }, { "from": "human", "value": "/*\n * $Id$\n *\n * Copyright (c) 2013, Juniper Networks, Inc.\n * All rights reserved.\n * This SOFTWARE is licensed under the LICENSE provided in the\n * ../Copyright file. By downloading, installin...
c
chosen
[ { "from": "system", "value": "Add 'expected-warning' for braces around scalar initializer\n\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58280 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "// RUN: clang -checker-simple -verify %s\n\nint* f1() {\n int x = 0;\...
c
chosen
[ { "from": "human", "value": "Add structs used in the GDT\n" }, { "from": "gpt", "value": "/*GDT stands for \"Global Descriptor Table\". \nIt is a table available on i386 (ix86?)\nprocessors. The GDT is a list of 64 bit entries.\nGRUB (or our boot) loader will install the GDT for us.\nIf we overw...
c
chosen
[ { "from": "system", "value": "Clarify that LD_LIBRARY_PATH must be set when Gambit is build with shared libs\n" }, { "from": "human", "value": "/*\n * Time stamp of last source code repository commit.\n */\n\n#define ___STAMP_YMD 20131223\n#define ___STAMP_HMS 145645\n" }, { "from": "gpt...
c
chosen
[ { "from": "system", "value": "Fix broken compilation of Linux for the famous string.h header\n\ngit-svn-id: 9714148d14941aebeae8d7f7841217f5ffc02bc5@1260 4143565c-f3ec-42ea-b729-f8ce0cf5cbc3\n" }, { "from": "human", "value": "\n#ifndef _H_SAMSON_QUEUE_TASK_MANAGER\n#define _H_SAMSON_QUEUE_TASK_M...
c
chosen
[ { "from": "system", "value": "Include Arduino.h to make sure we have types like \"boolean\"\n" }, { "from": "human", "value": "#ifndef SwitecX25_h\n#define SwitecX25_h\n\nclass SwitecX25\n{\n public:\n static const unsigned char pinCount = 4;\n static const unsigned char stateCount = 6;\n ...
c
chosen
[ { "from": "system", "value": "Fix test in two ways: remove incorrect comment (the intrinsic generated now\nis of the llvm.sjlj.* flavore) and convert grep->FileCheck\n\n\ngit-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@181468 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "va...
c
chosen
[ { "from": "system", "value": "Remove falloc header from linux build\n" }, { "from": "human", "value": "#define _GNU_SOURCE\n#define _FILE_OFFSET_BITS 64\n\n#include <fcntl.h>\n#include <stdint.h>\n#include <linux/falloc.h>\n\nint native_fallocate(int fd, uint64_t len) {\n return fallocate(fd,...
c
chosen
[ { "from": "system", "value": "Fix symbol name of errno$UX$2003\n" }, { "from": "human", "value": "/*\n * Copyright 2013 Mo McRoberts.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obta...
c
chosen
[ { "from": "system", "value": "Fix build of tutorials that require libpng under Visual Studio.\n" }, { "from": "human", "value": "// A current_time function for use in the tests. Returns time in\n// milliseconds.\n\n#ifdef _WIN32\nextern \"C\" bool QueryPerformanceCounter(uint64_t *);\nextern \"...
c
chosen
[ { "from": "system", "value": "Change --version format to \"<name> (Boreutils) <version>\"\n" }, { "from": "human", "value": "#ifndef BOREUTILS_H\n#define BOREUTILS_H\n\n#include <string.h>\n\nstatic const char *BOREUTILS_VERSION = \"0.0.0b1\";\n\nint has_arg(int argc, char **argv, char *search);...
c
chosen
[ { "from": "system", "value": "Move the include file around.\n" }, { "from": "human", "value": "#ifndef _CHAMPLAIN_PERL_H_\n\n#include <clutterperl.h>\n#include <champlain/champlain.h>\n#include \"ppport.h\"\n#include \"champlain-autogen.h\"\n\n#ifdef CHAMPLAINPERL_GTK\n#include <champlain-gtk/ch...
c
chosen
[ { "from": "system", "value": "Define MR_NO_LOGGING to force no logging.\n" }, { "from": "human", "value": "//\n// MagicalRecord for Core Data.\n//\n// Created by Saul Mora.\n// Copyright 2011 Magical Panda Software. All rights reserved.\n//\n\n// enable to use caches for the fetchedResultsCon...
c
chosen
[ { "from": "system", "value": "doc: Add doxygen comment to IsRBFOptIn\n\nFormer-commit-id: 6c99ae13e834f996721944c8571101bd2c16ba81" }, { "from": "human", "value": "// Copyright (c) 2016-2019 The Bitcoin Core developers\n// Distributed under the MIT software license, see the accompanying\n// file...
c
chosen
[ { "from": "system", "value": "Fix problem reported by Soonho\n\nSigned-off-by: Leonardo de Moura <7610bae85f2b530654cc716772f1fe653373e892@microsoft.com>\n" }, { "from": "human", "value": "/*\nCopyright (c) 2013 Microsoft Corporation. All rights reserved.\nReleased under Apache 2.0 license as de...
c
chosen
[ { "from": "system", "value": "Fix leak in calloc failure path.\n" }, { "from": "human", "value": "/* --------------------------------------------------------------------------\n * Name: create.c\n * Purpose: Associative array implemented as a hash\n * -----------------------------------------...
c
chosen
[ { "from": "system", "value": "Allow suppression of \"deprecated header\" warning\n\n\ngit-svn-id: 27238e37a5eae711b76ec703b45445819ea9563e@600 c3353b84-d008-0410-9ed9-b55c4f7fa7e8\n" }, { "from": "human", "value": "/*-------------------------------------------------------------------------\n *\n...
c
chosen
[ { "from": "system", "value": "Make a watchdog timer blink a LED\n" }, { "from": "human", "value": "#include <avr/io.h>\n\nint main (void) {\n\n\t//Set pin 3 as output to source current?\n\tPORTB = 1<<PORTB3;\n\tDDRB = 1<<DDB3;\n\n}" }, { "from": "gpt", "value": "#include <avr/io.h>\n...
c
chosen
[ { "from": "system", "value": "[libc++] Exclude posix_l/strtonum fallback inclusion for newlib > 2.4\n\nSummary:\n[libc++] Exclude posix_l/strtonum fallback inclusion for newlib > 2.4\n\nr338122 changed the linkage of some methods which revealed an existing ODR violation, e.g.:\nprojects/libcxx/include/suppo...
c
chosen
[ { "from": "system", "value": "lib-fts: Add note about possible additional apostrophe.\n" }, { "from": "human", "value": "#ifndef FTS_COMMON_H\n#define FTS_COMMON_H\n\n#define IS_NONASCII_APOSTROPHE(c) \\\n\t((c) == 0x2019 || (c) == 0xFF07)\n#define IS_APOSTROPHE(c) \\\n\t((c) == 0x0027 || IS_NON...
c
chosen
[ { "from": "human", "value": "Add a snippet (lang C).\n" }, { "from": "gpt", "value": "#include <stdlib.h>\n#include <stdio.h>\n\ntypedef struct list {\n int data;\n struct list * next;\n} list;\n\nlist * make_elem(void) {\n list * pe;\n\n if(NULL == (pe = malloc(sizeof(list)))) {\n ...
c
chosen
[ { "from": "system", "value": "Add bitwise copy of struct to complex struct example.\n" }, { "from": "human", "value": "#include <stdio.h>\n\ntypedef struct {\n int *x;\n int **y;\n} inner ;\n\ntypedef struct {\n int *g;\n inner in[3];\n} outer;\n\n\nint *ep;\n\nint main(int argc, cha...
c
chosen
[ { "from": "system", "value": "Remove now irrelevant motivation section\n" }, { "from": "human", "value": "#import <Foundation/Foundation.h>\n\n// Motivation:\n// JSON responses frequently contain 'null'. For our purposes, a JSON object with\n// a null property is equivalent to the same object wi...
c
chosen
[ { "from": "human", "value": "Add new header file. (or: xcode is stupid)" }, { "from": "gpt", "value": "//\n// BDSKSearchGroupViewController.h\n// Bibdesk\n//\n// Created by Christiaan Hofman on 1/2/07.\n/*\n This software is Copyright (c) 2007\n Christiaan Hofman. All rights reserved.\n \n Re...
c
chosen
[ { "from": "human", "value": "FEAT: Make things based on Asio `service_io` inherite from same base\n" }, { "from": "gpt", "value": "// MIT License\n\n// Copyright (c) 2017 Zhuhao Wang\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and assoc...
c
chosen
[ { "from": "human", "value": "Check if two linked lists are identical or same." }, { "from": "gpt", "value": "#include \"listHelper.h\"\n\nint isIdentical(struct linkList *head1, struct linkList *head2)\n{\n\t/* list1 and list2 has to have same data and length\n\t * even if length or data mismatc...
c
chosen
[ { "from": "system", "value": "Change NSString property to copy\n" }, { "from": "human", "value": "//\n// YSProcessTimer.h\n// YSProcessTimeExample\n//\n// Created by Yu Sugawara on 2014/02/21.\n// Copyright (c) 2014年 Yu Sugawara. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\...
c
chosen
[ { "from": "system", "value": "Fix SpinLock and add tryLock.\n" }, { "from": "human", "value": "// SyncTools.h\n// This file is part of the EScript programming language (https://github.com/EScript)\n//\n// Copyright (C) 2015 Claudius Jhn <ClaudiusJ@live.de>\n//\n// Licensed under the MIT License....
c
chosen
[ { "from": "human", "value": "Add missing file. Remove debuggig statements\n" }, { "from": "gpt", "value": "#ifndef TAILPRODUCE_UTILS_H\n#define TAILPRODUCE_UTILS_H\n\n#include <string>\n#include <sstream>\n#include <memory>\n#include <unordered_map>\n#include <utility>\n\n#include <cereal/cerea...
c
chosen
[ { "from": "system", "value": "Use integers instead of floats in for-loop\n\nWhile this adds a few more lines to the program, I think it makes it\nmore explicit where the constants come from. It also faciliates\neasier modification of the example.\n\nIt's also safer to use an integer instead of a float as a ...
c
chosen
[ { "from": "system", "value": "Comment out unused fields in kndLearnerService\n" }, { "from": "human", "value": "#pragma once\n\n#include <pthread.h>\n#include <glb-lib/output.h>\n\n#include <kmq.h>\n#include <knd_shard.h>\n\nstruct kndLearnerService;\n\nstruct kndLearnerOptions\n{\n char *con...
c
chosen
[ { "from": "system", "value": "Change to send routine: return status\n" }, { "from": "human", "value": "#ifndef HTTPD_PLATFORM_H\n#define HTTPD_PLATFORM_H\n\nvoid httpdPlatSendData(ConnTypePtr conn, char *buff, int len);\nvoid httpdPlatDisconnect(ConnTypePtr conn);\nvoid httpdPlatInit(int port, i...
c
chosen
[ { "from": "system", "value": "Make command line argument case insensitive\n" }, { "from": "human", "value": "#include <stdio.h>\n#include <string.h>\n\n#include <X11/Xlib.h>\n#include <X11/XKBlib.h>\n\n#define CAPSLOCK 2\n\n\nvoid setcaps(int on)\n{\n Display* display = XOpenDisplay(NULL);\n ...
c
chosen
[ { "from": "human", "value": "Add routine screenBuffer to enable scrolling view and to enable\nsyntax highlighting.\n" }, { "from": "gpt", "value": "#! /usr/bin/tcc -run\n\n/*** construct scroll ready screen buffer ***/\n \n// y = 0,1,2 ... (text buffer first line, second line, ...)\n// x = 0...
c
chosen
[ { "from": "system", "value": "Fix AddUserToList bug when root is NULL\n" }, { "from": "human", "value": "#include \"user.h\"\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n\nuser_t* NewUser(int fd,char *addr,unsigned short port,char *name){\n user_t *user = malloc(sizeof(user_...
c
chosen
[ { "from": "system", "value": "Increase version number for KDE 3.5.9.\n\nsvn path=/branches/KDE/3.5/kdepim/; revision=771811\n" }, { "from": "human", "value": "// KMail Version Information\n//\n#ifndef kmversion_h\n#define kmversion_h\n\n#define KMAIL_VERSION \"1.9.8\"\n\n#endif /*kmversion_h*/\n...
c
chosen
[ { "from": "system", "value": "Add virtual deconstructor for abstract class Downloader\n" }, { "from": "human", "value": "// Copyright (c) 2015, Galaxy Authors. All Rights Reserved\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n//\n// Au...
c
chosen
[ { "from": "system", "value": "Allow reading back callbacks set to handles\n" }, { "from": "human", "value": "#include <string.h>\n\n#include \"luv.h\"\n#include \"luv_functions.c\"\n\nint luv_newindex(lua_State* L) {\n lua_getfenv(L, 1);\n lua_pushvalue(L, 2);\n lua_pushvalue(L, 3);\n lua_ra...
c
chosen
[ { "from": "system", "value": "Build if GETC_MACRO use is disabled\n" }, { "from": "human", "value": "/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>\n *\n * GNU Library General Public License (LGPL) version 2 or later.\n *\n * Dedicated to Toni. See uClibc/DEDICATION.mjn3 fo...
c
chosen
[ { "from": "system", "value": "Make sure NOMINMAX is not redefined\n" }, { "from": "human", "value": "#pragma once\r\n\r\n#define NOMINMAX\r\n#include <windows.h>\r\n\r\n#include <streams.h>\r\n\r\n#include <audioclient.h>\r\n#include <comdef.h>\r\n#include <malloc.h>\r\n#include <mmdeviceapi.h>\...
c
chosen
[ { "from": "system", "value": "Fix for missing forward declaration in AliROOT\n" }, { "from": "human", "value": "#ifndef ALIVERTEXERHYPERTRITON3BODY_H\n#define ALIVERTEXERHYPERTRITON3BODY_H\n\n#include <AliVertexerTracks.h>\n\nclass AliESDVertex;\nclass AliESDtrack;\nclass AliExternalTrackParam;\...
c
chosen
[ { "from": "system", "value": "Include <sys/systm.h> for the definition of offsetof() instead of depending\non the definition being misplaced in <sys/types.h>. The definition probably\nbelongs in <sys/stddef.h>.\n" }, { "from": "human", "value": "/* $FreeBSD$ */\n\n#include <sys/param.h>\n#inclu...
c
chosen
[ { "from": "system", "value": "Add method 'RClean' for clean memory\n" }, { "from": "human", "value": "#ifndef RUTIL2_RALLOC_H\n#define RUTIL2_RALLOC_H\n\n#include \"OO.h\"\n\nvoid* RAlloc(int Size);\nvoid* RAlign(int Align, int Size);\n\n#if defined(__MINGW32__)\n#define _aligned_malloc __mingw_...
c
chosen
[ { "from": "system", "value": "Fix typo in a comment: it's base58, not base48.\n" }, { "from": "human", "value": "#ifndef BITCOINADDRESSVALIDATOR_H\n#define BITCOINADDRESSVALIDATOR_H\n\n#include <QValidator>\n\n/** Base48 entry widget validator.\n Corrects near-miss characters and refuses chara...
c
chosen