text stringlengths 3.12k 18.7k |
|---|
#include <u.h>
#include <libc.h>
#include <mach.h>
#include "macho.h"
/*
http://www.channelu.com/NeXT/NeXTStep/3.3/nd/DevTools/14_MachO/MachO.htmld/
*/
Macho*
machoopen(char *name)
{
int fd;
Macho *m;
if((fd = open(name, OREAD)) < 0)
return nil;
m = machoinit(fd);
if(m == nil)
close(fd);
return m;
}
stat... |
/* Parsing FTP `ls' output.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of Wget.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the Licens... |
#include <stdlib.h>
#include <string.h>
#include "cpu.h"
#include <stdio.h>
const char nomnem[] = "undef";
void nil_reset(CPU* cpu) {}
int nil_exec(CPU* cpu) {return 1;}
int nil_int(CPU* cpu) {return 1;}
int nil_nmi(CPU* cpu) {return 1;}
xAsmScan nil_asm(const char* com, char* buf) {
xAsmScan res;
res.match = 0;
... |
/*
* Copyright 2021 F5 Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... |
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2002-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Publi... |
/*C Source file for the PopUp Menu widget
* This file is part of `TinyWidgets', a widget set for the nano-X GUI which
* is a part of the Microwindows project (www.microwindows.org).
* Copyright C 2000
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* This library is free sof... |
/* pcresearch.c - searching subroutines using PCRE for grep.
Copyright 2000, 2007, 2009-2015 Free Software Foundation, Inc.
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 ... |
// ----------------------------------------------------------------------------
// Copyright 2016-2017 ARM Ltd.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of ... |
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdlib.h>
#include <stdio.h>
/*Need to link with Ws2_32.lib, Mswsock.lib, and Advapi32.lib*/
#pragma comment (lib, "Ws2_32.lib")
#pragma comment (lib, "Mswsock.lib")
#pragma comment (lib, "AdvApi32.lib")
#define D... |
#include "Matrix.h"
#include <math.h>
Matrix makeMatrixZero() {
return (Matrix) {
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0
};
}
Matrix makeMatrixIdentity() {
return (Matrix) {
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
};
}
Matrix makeMatrixTranslation(const Vector v) {
return (Matr... |
#include <stddef.h>
#include <stdio.h>
#include <zimg.h>
#include "aligned_malloc.h"
#include "argparse.h"
struct Arguments {
const char *inpath;
const char *outpath;
unsigned in_w;
unsigned in_h;
unsigned out_w;
unsigned out_h;
};
static const ArgparseOption program_positional[] = {
{ OPTION_STRING, 0, "i... |
/*
* lxc: linux Container library
*
* (C) Copyright IBM Corp. 2007, 2008
*
* Authors:
* <NAME> <<EMAIL>.lez<EMAIL> at free.fr>
*
* 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; ... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "configure.h"
#include "mkl_dnn.h"
#define CHECK_ERR(f, err) \
do \
{ \
(e... |
/**
*
* @copyright © 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der
* angewandten Forschung e.V. All rights reserved.
*
* BSD 3-Clause License
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. R... |
// Copyright (C) 2016-2019 Semtech (International) AG. All rights reserved.
//
// This file is subject to the terms and conditions defined in file 'LICENSE',
// which is part of this source code package.
#include <string.h>
#include "update.h"
#include "boottab.h"
#include "sha2.h"
// ------------------------------... |
/**************************************************************************//**
* @file system_MK70F.c
* @brief CMSIS Cortex-M# Device Peripheral Access Layer Source File for
* Device MK70Fxx
* @version V3.01
* @date 06. March 2012
*
* @note
* Copyright (C) 2010-2012 ARM Limited. All right... |
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include "include/imp_structures.h"
#include "include/imp_variables.h"
void matrix_square(double A[2][2], double C[2][2])
{
/*------------------------------------------------------------------------
Squares a 2x2 matrices... |
/**
* @file fimerd.c
* @author <NAME>
* @date 5 Nov 2016
* @brief Daemon that runs jobs and accepts socket connections
*
* Daemon creates a worker thread that spawns with child process and
* goes into an accept() blocking mode for listening to connections
* Meanwhile, daemon forked process periodically checks ... |
/*
* Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <errno.h>
#include <common/fdt_fixup.h>
#include <common/fdt_wrappers.h>
#include <drivers/arm/gicv3.h>
#include <drivers/delay_timer.h>
#include <drivers/generic_d... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ripemd128.c :+: :+: :+: ... |
/*
* Copyright (c) 2019-2021 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, pub... |
/**
* @file
* @brief The Internet Protocol (IP) output module.
*
* @date 03.12.09
* @author <NAME>
* @author <NAME>
* @author <NAME>
*/
#include <errno.h>
#include <net/l3/ipv4/ip.h>
#include <net/l4/udp.h>
#include <net/socket/inet_sock.h>
#include <net/inetdevice.h>
#include <net/l3/route.h>
#include <net/l... |
/**
* @file text_mmap.c
*
* Map a text file, ensuring the text always has an ending NUL byte.
*
* @addtogroup autoopts
* @{
*/
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
* AutoOpts is Copyright (C) 1992-2015 by <NAME> - all rights reserved
*
* AutoOpts is av... |
#define WIN32_SERVICE_VERSION "0.5.2"
#define MAX_KEY_SIZE 24
#define MAX_SERVICES 1000
#define MAX_BUF_SIZE 4096
struct servicestruct{
SC_HANDLE hSCManager;
};
typedef struct servicestruct SvcStruct;
static void service_free(SvcStruct *p){
CloseServiceHandle(p->hSCManager);
p->hSCManager = N... |
/* Copyright (C) 2013 The Regents of the University of California
* See README in this or parent directory for licensing information. */
#include "retroGene.h"
/* bit set of labels to use */
enum {useOrgCommon = 0x01,
useOrgAbbrv = 0x02,
useOrgDb = 0x04,
useGene = 0x08,
useAcc ... |
/*
A module for evaluating at a set of points x_i a vector field which is defined
as the gradient of the convolution of a radial function with a set of 'masses'
at points y_j. This is useful, for example, for calculating the radial
component of a softened gravitational force in a non-periodic domain.
For si... |
/* $NetBSD: license.c,v 1.4 2013/04/20 15:29:23 wiz Exp $ */
/*-
* Copyright (c) 2009 <NAME> <<EMAIL>>.
* 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 ... |
/* Copyright 2015 <NAME>
*
* This file is part of Curses Bird.
*
* Curses Bird is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as published
* by the Free Software Foundation.
*
* Curses Bird is distributed in the hope that it will be usefu... |
#include "process.h"
#include "scheduler.h"
char buff2[8];
static int nextPid = 1; //Esta variable le asigna a cada proceso un pid distinto
tProcess* createProcess(char* processName,void* startingPoint, int parentPid, int argc, char* argv[]) {
/*Se reserva espacio para la estructura del proceso*/
tProcess* pro... |
/*
* Base64 Decode
* Polfosol
*
* Base64 encoding/decoding (RFC1341)
* Copyright (c) 2005-2011, <NAME> <<EMAIL>>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*
*/
// Source code from Polfosol: https://stackoverflow.com/questions/180947/ba... |
/** _GNU_SOURCE for asprintf() */
#define _GNU_SOURCE
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <pthread.h>
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <sys/syscall.h>
#include <tinylo... |
/*
Copyright Copyright (C) 2013 <NAME>
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 3 of the License, or
(at your option) any later version.
This program is... |
/*
* Licensed to Systerel under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Systerel licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this
* file except ... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus - device.c *
* Mupen64Plus homepage: https://mupen64plus.org/ *
* Copyright (C) 2016 <NAME> *
* ... |
#line 1 "emoji_presentation_scanner.rl"
/* Copyright 2019 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... |
/**
* \file pwmss.c
*
* \brief This file contains functions which does platform specific
* configurations for PWMSS.
*/
/*
* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
*/
/*
* Redistribution and use in source and binary forms, with or without
* modification, ar... |
//
// xor.c
// XOR Problemi - Yapay Sinir Ağları
//
// Created by <NAME> on 27/04/17.
//
//
#include <stdio.h>
#include <math.h>
int noron1[] = {0,0,1,1}, noron2[] = {0,1,0,1};
float gizliKatman1, gizliKatman2;
int biasGizli=1, biasCikis=1;
float agirlik[] = {0.129952, 0.570345, -0.923123, -0.328932, 0.341232, -... |
#include <fudge.h>
#include <kernel.h>
#include <kernel/x86/cpu.h>
#include <kernel/x86/gdt.h>
#include <kernel/x86/idt.h>
#include <kernel/x86/tss.h>
#include <kernel/x86/arch.h>
#include <modules/arch/x86/io/io.h>
#include "pic.h"
#define ROUTINES 16
#define REG_COMMAND0 0x0... |
/********************************************************
* *
* Licensed under the Academic Free License version 3.0 *
* *
********************************************************/
// Standard library
#include... |
/*
* Copyright (C) Texas Instruments - http://www.ti.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 option) any later versi... |
/* Copyright (c) 2014-2016 <NAME> @RLofC
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including com... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyri... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include "primes.h"
#include "misc.h"
int* erathostene(int n, int *nb_primes){
n++; //c'est le plus simple pour régler les problèmes d'indice
bool sieve[n];
memset(sieve, true, n*sizeof(bool));
int j, limit;
limit = 1+sqrti(n);
// C... |
/*
* Copyright (c) 2017-2018, Exile Heavy Industries
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the disclaimer
* below) provided that the following conditions are met:
*
* * Redistribution... |
/*
Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it
under the terms of version 2.1 of the GNU Lesser General Public License
as published by the Free Software Foundation.
This program is distributed in the hope that... |
/*
* Copyright (C) 2002
* <NAME>. 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
* notice, this list of conditions... |
/*******************************************************************************
Project:
CAN Bus Driver for EPICS
File:
devAiCan.c
Description:
CANBUS Analogue Input device support
Author:
<NAME> <<EMAIL>>
Created:
8 August 1995
Version:
$Id: devAiCan.c 177 2008-11-11 20:41:45Z anj $
Copyr... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "util.h"
int check_endptr(const char *name, const char *str, const char *endptr, const char *param_name)
{
if (endptr == str || *endptr != '\0') {
if (name == NULL) LOG_... |
#include <stdio.h>
#include <stdlib.h>
#include <celib/macros.h>
#include <celib/memory/allocator.h>
#include <celib/id.h>
#include <celib/memory/memory.h>
#include <celib/api.h>
#include <celib/ydb.h>
#include <celib/module.h>
#include <celib/cdb.h>
#include <cetech/renderer/gfx.h>
#include <cetech/debugui/debugui.... |
/* Copyright (C) 2003,2004 <NAME>, SuSE Labs.
Manage shared memory policy for numactl.
The actual policy is set in numactl itself, this just sets up and maps
the shared memory segments and dumps them.
numactl is free software; you can redistribute it and/or
modify it under the terms of the GNU General P... |
/* Shared library add-on to iptables to add recent matching support. */
#include <stdio.h>
#include <netdb.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
#include <iptables.h>
#include <linux/netfilter_ipv4/ipt_recent.h>
/* Need these in order to not fail when compiling against an older kernel. */
#if... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
/*
(c) Copyright 2000-2002 convergence integrated media GmbH.
All rights reserved.
Written by <NAME> <<EMAIL>>,
<NAME> <<EMAIL>> and
<NAME> <<EMAIL>>.
This file is subject to the terms and conditions of the MIT License:
Permission is hereby granted, free of c... |
/*
* Copyright 2019 Google LLC
* SPDX-License-Identifier: MIT
*
* based in part on anv and radv which are:
* Copyright © 2015 Intel Corporation
* Copyright © 2016 Red Hat.
* Copyright © 2016 <NAME>
*/
#include "vn_wsi.h"
#include "vk_enum_to_str.h"
#include "wsi_common_entrypoints.h"
#include "vn_device.h"
#... |
/**
* Short example to describe how to trigger an amplifier balance
*
* for analogue channels of a specific board
*
*
*/
#include "dewepxi_apicore.h"
#include "dewepxi_apiutil.h"
#include "dewepxi_types.h"
#include "trion_sdk_util.h"
//needed Board-Type for this example
const char* sBoardNameN... |
/*
* Copyright (c) 2005-2007 <NAME>, Inc. All rights reserved.
* Proprietary and Confidential Material.
*
*/
#include <stdio.h>
#include <ctype.h>
#include <termio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <time.h>
#include <signal.h>
#include "wave.h"... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
/* browse a filesystem like a pro */
//#define DEBUG_TOOL
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
#include <limits.h>
#include <assert.h>
#include <stdbool.h>
#include "debug.h"
#include "runtime.h"
#include "type_info.h"
static void menu(struct type_info* cur);
static bool ha... |
/*
* SPI.c
*
* Created: 2021-02-19 오전 11:25:01
* Author: 82107
*/
#include "essential.h"
#include "mpu6050.h"
#define READ 1
#define WRITE 0
void SPI_init(void)
{
SPCR = (1<<SPE)|(1<<MSTR)|(1<<CPOL)|(1<<CPHA)|(1<<SPR0); //mode3, 1MHz 이걸 mode3으로 해야되네?
sbi(DDRB, 0); //SS
sbi(PORTB, 1)... |
/*******************************************************************************
*
* Project: Daisy Client Library
*
* Filename: example500.c
*
* Purpose: Example for using daisybase lib with ASC500
*
* Author: NHands GmbH & Co KG
*
*********************************************... |
/*
This file contains a serial quicksort routine, and a number of debugging routines
that display the current state of the algorithm. These are intended to help you
develop and debug your solution, and it is highly recommended (although not
compulsory) that you use these routines.
You should not include this fil... |
#include <stdlib.h>
#include <stdbool.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "dictionary.h"
int MAX_FILE_SIZE = 1024 * 1024 * 2;
int MAX_READ = 1024 * 512;
int hstrcmp(char* str1, char* str2)
{
int len1 = strlen(str1);
... |
#include "tic.h"
typedef signed int int8_t __attribute__((__mode__(__QI__)));
typedef unsigned int uint8_t __attribute__((__mode__(__QI__)));
typedef signed int int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int uint16_t __attribute__ ((__mode__ (__HI__)));
typedef signed int int32_t __attribute__ ((__mo... |
/*****************************************************************************
* error.c: DOS and Winsock error messages formatting
*****************************************************************************
* Copyright © 2006-2013 <NAME>
*
* This program is free software; you can redistribute it and/or modify i... |
#include "http-websocket-internal.h"
#include "cpm/param.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
enum { WEBSOCKET_FRAME_MAXLENGTH = 64 * 1024 }; // 64KB
enum {
WEBSOCKET_PARSER_INIT = 0,
WEBSOCKET_PARSER_HEADER = 1,
WEBSOCKET_PARSER_HEADER_EXTENDED = 2,
WEBSOCKET_PARSER_PAYLOAD = 3,
};
int... |
#include <kernel/arch/x86/mmu.h>
#include <kernel/heap.h>
#include <kernel/lib/string.h>
#include <kernel/video/vga.h>
#include <kernel/panic.h>
/* The kernel's page directory */
page_directory_t *kernel_directory = 0;
/* The current page directory */
page_directory_t *current_directory = 0;
/* A bitset of frames - ... |
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... |
#include "filttab.h"
#define GK_NOR "a"
#define GK_BD_NM "b"
/* not dealing with beta font change $2: shift into expanded greek font*/
#define GK_IT_NM "d"
#define GK_SUP_NM "e"
#define GK_SUB_NM "f"
#define GK_BD_SUP "g"
/* not dealing with beta font change $7: shift out of expanded greek font*/
/* or with $8: shif... |
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <string.h>
#include "k5-int.h"
#include <kadm5/admin.h>
#include <client_internal.h>
#include "auth_con.h"
#include <locale.h>
krb5_error_code
krb5int_mk_chpw_req(
krb5_context context,
krb5_auth_... |
//
// Created by cout970 on 12/02/18.
//
#include <debug.h>
#include <monitor.h>
#include <fs/filesystem.h>
#include <network.h>
#include <motherboard.h>
#include "../include/quarry.h"
#define CHECK_STOP() if (stopped || checkKey('q')) { stopped = TRUE; return; }
extern struct {
INodeRef currentFolder;
Int ... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* o... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <unistd.h>
// QTYPE Values
#define QTYPE_A 1 // a host address
#define QTYPE_NS 2 // an authoritative name server
#define QTYPE_MD 3 // a mail dest... |
#include "wave.h"
#include "mrrb.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdbool.h>
// Read n bytes from the WAV file, and, if(compare_en), compares the obtained array with a given one
bool read_n_bytes(wave_file_t *wave, uint8_t *out_buff, si... |
#include <algorithms/trivial.h>
#include <algorithms/trivial_mem.h>
#include <algorithms/kmp.h>
#include <algorithms/bm.h>
#include <algorithms/rk.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <limits.h>
#include "min_unit.h"
static int tests_run;
static const char *test_match_negative(uint... |
/*Copyright 2022 <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, ... |
/*--------------------------------------------------------------------
This source distribution is placed in the public domain by its author,
<NAME>. You may use it for any purpose, free of charge,
without having to notify anyone. I disclaim any responsibility for any
errors.
Optionally, please be nice and tell me if ... |
/*
* A test program for playing with SELinux contexts and permissions
*
* Based on a simple premise of a native C binary, that reads one config file and writes an output file
*
* Credits for code:
* https://gsamaras.wordpress.com/code/eat-spaces-and-newline-c/
* https://www.pacificsimplicity.ca/blog/simple-read-... |
/*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <sys/mman.... |
#include "event.h"
#include "mouse_events.c"
#include "keyboard_events.c"
#include "clipboard_events.c"
#include "focus_events.c"
#include "drawable_events.c"
#include "window_events.c"
#include "other_events.c"
VALUE cXrbEvent;
VALUE cXrbNoEvent;
void xrb_event_free(xrb_event_d *d) {
free(d);
}
VALUE xrb_event_al... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2015 Advanced Micro Devices, Inc.
*
* 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; version 2 of the License.
*
* This ... |
#include <stdio.h>
#include "rz_util.h"
void check(const char *exp, const char *act, const char *desc) {
if (strcmp(exp, act) == 0)
printf("\x1b[34m[+][%s]\x1b[39;49m test passed\n", desc);
else
printf("\x1b[31m[-][%s]\x1b[39;49m test failed (actual = %s\x1b[39;49m, expected = %s\x1b[39;49m)\n", desc, act, exp);... |
/*
* Copyright (c) 2003-2011 <NAME> (<EMAIL>)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
* General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
... |
/* $Id: pageflip.c,v 1.18 2008/03/13 19:54:44 cegger Exp $
******************************************************************************
pageflip.c - test the multiple buffering functions of LibGGI
Authors: 1998 <NAME> [<EMAIL>]
This software is placed in the public domain and can be used freely
for ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <termios.h>
#include <sys/ioctl.h>
#define VER "0.1"
#define TWLEN 140
#define TAILLEN 9
#define BBCH 4096 // Should be enough for any sane twittrer
#define MBCH 1024
#define SBCH 256
#define WHT "\033[1m\033[37m"
#define RED ... |
/*
* Copyright 2020 Makani Technologies LLC
*
* 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 ... |
/*
* Copyright 2020-present MongoDB, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... |
/*
* The PCI Utilities -- Show Bus Tree
*
* Copyright (c) 1997--2008 <NAME> <<EMAIL>>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#include <stdio.h>
#include <string.h>
#include "lspci.h"
struct bridge {
struct bridge *chain; /* Single-linked list of bridges */
struct bridge... |
/**
*
* Copyright 2016-2020 Netflix, Inc.
*
* Licensed under the BSD+Patent License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/BSDplusPatent
*
* Unless required by ap... |
/* xZTL: Zone Translation Layer User-space Library
*
* Copyright 2019 Samsung Electronics
*
* Written by <NAME> <<EMAIL>>
*
* 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... |
#include "decompressor.h"
#include "bit_reader.h"
uint16_t (*s_read)(uint8_t) = BitReader_read_bits;
static uint8_t read_pair() {
return s_read(2);
}
static uint16_t decode_rle() {
uint8_t n_bits = 1;
while (s_read(1)) {
n_bits++;
}
return (1 << n_bits) + s_read(n_bits) - 1;... |
/******************************************************************
*
* CyberLink for C
*
* Copyright (C) <NAME> 2005
*
* Copyright (C) 2006 Nokia Corporation. All rights reserved.
*
* This is licensed under BSD-style license,
* see file COPYING.
*
* File: cdevice_ssdp_server.c
*
* Revision:
*
* 03/22... |
#include <sys/_null.h>
#include <string.h>
#include <stdbool.h>
#include <include/task.h>
#include <include/proto.h>
#include "include/arch_proto.h"
#include "include/archconst.h"
#include "include/archtypes.h"
#include "include/arch_task.h"
#include <include/ktypes.h>
#define SEG_NR 6
typedef struct mm_pair
{
vi... |
/*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2004-2010 <NAME> <<EMAIL>>
*
*
* 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... |
/*
* (C) 2001 Clemson University and The University of Chicago
*
* See COPYING in top-level directory.
*/
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/time.h>
#include <time.h>
#include <stdlib.h>
#includ... |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#include <stdio.h>
#include <stdlib.h>
#include "hal_oled.h"
#include "aos/hal/pwm.h"
#include "musicbox.h"
MENU_COVER_TYP musicbox_cover = {MENU_COVER_FUNC, NULL, NULL, musicbox_cover_draw, 0};
MENU_TASK_TYP musicbox_tasks = {
musicbox_init,
mus... |
/********************************************************************
* File : event.h
* Author : <NAME> Copyright (C) 1994-2019
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mo... |
/*
* Copyright (c) 2000-2002,2005,2008,2010,2013,2016,2021 by Solar Designer
* See LICENSE
*/
#ifdef _MSC_VER
#define _CRT_NONSTDC_NO_WARNINGS /* we use POSIX function names */
#include <windows.h>
#include <wincrypt.h>
#else
#include <limits.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#endif
#inc... |
/*
utpdf/utps
margin-aware converter from utf-8 text to PDF/PostScript
Copyright (c) 2021 by <NAME>
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/LIC... |
/********************************************************************/
/* Scon.c - cgi that updates sensor values in shared memory */
/********************************************************************/
#include <sys/sem.h>
#include <sys/ipc.h>
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#inc... |
/*
* Copyright © 1999 <NAME>
* XKB integration © 2006 Nokia Corporation, author: <NAME> <<EMAIL>>
*
* LinuxKeyboardRead() XKB code based on xf86KbdLnx.c:
* Copyright © 1990,91 by <NAME>, Dinkelscherben, Germany.
* Copyright © 1994-2001 by The XFree86 Project, Inc.
*
* Permission is hereby granted, free of charg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.