text
stringlengths
3.08k
10.5k
#include <sys/types.h> #include <inttypes.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <fcntl.h> #include <limits.h> #ifdef _MSC_VER #include <io.h> #define ssize_t size_t #define basename(x) strrchr(x, '\\') + 1 #else #include <unistd.h> #include <libge...
/* * Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/l...
#include "scheduling_utility.h" #include "scheduling_sim.h" #include <assert.h> #include <stddef.h> #include <stdio.h> #include <string.h> #include <unistd.h> #define MAX_LEN_SCHEDULING_FUN 10 static int match_lines(FILE* fp, simulation_data_t* data) { assert(fp); assert(!data || (data && data->procs)); int line...
/* * Copyright (c) 2012-2017, <NAME> * All rights reserved. * * This file is under BSD 2-Clause "Simplified" License. */ #include <assert.h> #include <fcntl.h> #include <math.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <s...
/* * Copyright (c) 2002 <NAME>. All rights reserved. * * This software was written by <NAME> <<EMAIL>> for the * FreeBSD project. Redistribution and use in source and binary forms, with * or without modification, are permitted provided that the following * conditions are met: * * 1. Redistribution of source c...
#include <am.h> #include <benchmark.h> #include <limits.h> Benchmark *current; Setting *setting; static char *hbrk; #define ARR_SIZE(a) (sizeof((a)) / sizeof((a)[0])) #define ROUNDUP(a, sz) ((((uintptr_t)a)+(sz)-1) & ~((sz)-1)) // The benchmark list #define ENTRY(_name, _sname, _s, _m, _l, _desc) \ { .prepare = ...
/* * Copyright (c) 2018 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ #include <ctype.h> #include "shell_ops.h" #include "shell_help.h" #include "shell_utils.h" /* Function prints a string on terminal screen with requested margin. * It takes care to not divide words. * shell Pointer to ...
#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <sys/wait.h> /* strnlen() */ #include <string.h> /* uintptr_t */ #include <inttypes.h> #define _R_ 0 #define _W_ 1 #define MSG_SZ 201 #define MSG_MAX MSG_SZ - 1 const int _exec=1; const int _system=1; void producer_prnt(char *, ssize_t, ssize_...
/**\ * Copyright (c) 2021 Bosch Sensortec GmbH. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause **/ #include <stdio.h> #include "bma456mm.h" #include "common.h" /******************************************************************************/ /*! Macro definition ...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mupen64plus - gcop1.c * * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * * Copyright (C) 2002 Hacktarux * * ...
/* * Copyright 2018 Google Inc. * Author: <NAME> (<EMAIL>) * * Simple example on how to use TCP_INQ and TCP_CM_INQ. * * License (GPLv2): * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by ...
/* * Routines to do cryptographic interaction with proxies in PuTTY. * This is in a separate module from proxy.c, so that it can be * conveniently removed in PuTTYtel by replacing this module with * the stub version nocproxy.c. */ #include <assert.h> #include <ctype.h> #include <string.h> #include "pu...
#include <mruby.h> #include <mruby/gc.h> #include <mruby/hash.h> #include <mruby/class.h> struct os_count_struct { mrb_int total; mrb_int freed; mrb_int counts[MRB_TT_MAXDEFINE+1]; }; static void os_count_object_type(mrb_state *mrb, struct RBasic *obj, void *data) { struct os_count_struct *obj_count; obj_co...
/** * (C) Copyright 2017-2022 Intel Corporation. * * SPDX-License-Identifier: BSD-2-Clause-Patent */ #include <assert.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <krb5.h> #include "unit_test.h" #include "cmocka_tests.h" struct mocked_fn { void **fn_ptr_ptr; void *old_value; ...
/* Copyright (C) 2003 Red Hat, Inc. * Contributed by <NAME> <<EMAIL>> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ /* Any assembly language/system dependent hacks needed to setup * boot1.c so it will work as expected and cope with whatever platform * specific wierdness is needed...
#include"bibliotecas_montador.h" #include <errno.h>//usada para identificar erros de conversao erros ao usar a funcao strtol #include <limits.h>//usada para identificar erros de conversao erros ao usar a funcao strtol char * proxima_linha(FILE * arq){//assume que o arquivo ja esta aberto char *palavra; palavra...
/*====================================================================* - Copyright (C) 2001 Leptonica. 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 c...
#include <stdlib.h> #include <stdio.h> #include <inttypes.h> #include <stdarg.h> #include <ctype.h> #include <string.h> #include <assert.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include "util.h" /* Some systems don't have strndup. */ char *strdupn(char *s, size_t len) {...
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE 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 require...
/* * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed...
#include <driver/graphic.h> #include <generic/asm.h> #include <lib/stdlib.h> #include <lib/string.h> #include <static/font_8x13.h> #include <static/logo.h> #include <driver/driver.h> #include <driver/port.h> const volatile char *vm_start = (volatile char *)0x800B8000; uint disp_pos = 0; uint disp_o...
#include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> #include <fcntl.h> #include <unistd.h> #include <stdio.h> #include <endian.h> #include <errno.h> #include <string.h> #include "radiotap_iter.h" static int fcshdr = 0; static const struct radiotap_align_size align_size_000000_00[] = { [0] = { .align =...
/* * curses based 15 puzzle * Copyright (c) 1997 <NAME>(H) */ #include <stdlib.h> #include <unistd.h> #include <time.h> #include <curses.h> #include <sys/types.h> #include <sys/time.h> #ifndef SCOREFILE #define SCOREFILE "/var/games/15puzzle.score" #endif #define DEFAULT_TILE_X 4 #define DEFAULT_TILE_Y 3 #define...
/* * Copyright (c) 1989, 1990, 1991, 1993, 1994, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this ...
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2006 The University of Tennessee a...
/* * Copyright (c) 2007, Swedish Institute of Computer Science * 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 * ...
/* * Copyright (c) 1999, <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 a...
/* * Copyright (c) 2015-2016, <NAME>. All rights reserved. * * “Singularity” Copyright (c) 2016, The Regents of the University of California, * through Lawrence Berkeley National Laboratory (subject to receipt of any * required approvals from the U.S. Dept. of Energy). All rights reserved. * * This software ...
// Runs on LM3S811 // Provide a function that initializes Timer2A to trigger ADC // SS3 conversions and request an interrupt when the conversion // is complete. #include "lm3s811.h" #include "Potentiometers.h" void DisableInterrupts(void); // Disable interrupts void EnableInterrupts(void); // Enable interrupts long...
#include "stdafx.h" #include "Cse/Cse.h" #include "CvcCl/Cvc.h" NTSTATUS __fastcall TestThread( const pCvcConnection pConnection ) { NTSTATUS Status = STATUS_SUCCESS; char buff[0x100]; WORD DosSignature = 0; sprintf(buff, "%s", __FUNCTION__); CseOutputA(buff); const PLARGE_INTEGER CvcResu...
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <argz.h> #include "ibadmin.h" struct route { const char* method; const char* path; route_handler handler; } routes[] = { { "POST", "/login" , &handle_login }, { ...
/* SPDX-License-Identifier: BSD-3-Clause */ #include <stdio.h> #include <stdbool.h> #include <string.h> #include <target.h> #include "log.h" #include <uci.h> #include <uci_blob.h> typedef void (*awlan_update_cb)(struct schema_AWLAN_Node *awlan, schema_filter_t *filter); #define VERSION_MATRIX_FILE "/usr/opensync/.ve...
#include <stdio.h> #include <stdlib.h> #include <dirent.h> #include <string.h> #include <sys/stat.h> #include "utils.h" #include "rss.h" #include "global.h" static const char *current_dir = "."; int a_eltof(char *filename, FILE *fd){ char title[STR_SIZE], s_time[WAITT]; struct stat attribs; size_t len; FILE *el; ...
/* * This file is part of the coreboot project. * * Copyright (C) 2011 - 2012 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. * ...
#include "types.h" #include "stat.h" #include "user.h" #include "pstat.h" #define check(exp, msg) if(exp) {} else { \ printf(1, "%s:%d check (" #exp ") failed: %s\n", __FILE__, __LINE__, msg); \ exit();} //#define DDEBUG 1 #ifdef DDEBUG # define DEBUG_PRINT(x) printf x #else # define DEBUG_PRINT(x) do {} while...
/* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2019-05-05 jg1uaa the first version */ #include <rtthread.h> #include <rthw.h> #include "board.h" #include "drv_uart.h" #define SYSCON_BASE 0x4...
// ////////////////////////////////////////////////////////// // match.c // Copyright (c) 2015 <NAME>. All rights reserved. // see http://create.stephan-brumme.com/disclaimer.html // // I improved <NAME>'s code found in the excellent book "Beautiful Code", ISBN 9780596510046 // http://www.cs.princeton.edu/courses/arch...
/* * alock - cursor_image.c * Copyright (c) 2005 - 2007 <NAME> <akira at fluxbox dot org> * 2014 - 2016 <NAME> * * This file is a part of an alock. * * This project is licensed under the terms of the MIT license. * * This cursor module provides: * -cursor image:file=<file> * * TODO: png-files...
/* * rrprio.c - Implementacao do algoritmo Round Robin com Prioridades * * Autores: <NAME> * <NAME> * <NAME> * Projeto: Trabalho Pratico I - Sistemas Operacionais * Organizacao: Universidade Federal de Juiz de Fora * Departamento: Dep. Ciencia da Computacao * * */ #include "rrprio.h" #include ...
/***************************************************************************//** * @file * @brief CLI for the Door Lock Server plugin. ******************************************************************************* * # License * <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b> **********************...
/** @file * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved. * 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 the License at * * http://...
/* * Name: UTest003 * Purpose: Unit Testing ZVector Library * Author: <NAME> * Domain: General * License: Copyright by <NAME>, all rights reserved * Distributed under MIT license */ #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <time.h> #include <string.h> #if ( defined(_MS...
/* * CVF extensions for fat-based filesystems * * written 1997,1998 by <NAME> <<EMAIL>> * * please do not remove the next line, dmsdos needs it for verifying patches * CVF-FAT-VERSION-ID: 1.2.0 * */ #include<linux/sched.h> #include<linux/fs.h> #include<linux/msdos_fs.h> #include<linux/msdos_fs_sb.h> #include...
#include "rtp-demuxer.h" #include "rtp-internal.h" #include "rtp-payload.h" #include "rtp-packet.h" #include "rtp-queue.h" #include "rtp.h" #include "rtcp-header.h" #include <stdlib.h> #include <string.h> #include <assert.h> #include <stdio.h> #include <errno.h> struct rtp_demuxer_t { uint32_t ssrc; uint64_t c...
/* * Oracle Linux DTrace. * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ /* * 25767469 dtrace_update() does not merge address ranges properly * Verify fix. */ #include <...
/*************************************************** * Module name: main.c * * Copyright 2020 Company CDAC(T) * All Rights Reserved. * * The information contained herein is confidential * property of Company. The user, copying, transfer or * disclosure of such information is prohibited except * by express written ag...
/* based_task.c -- A basic real-time task skeleton. * * This (by itself useless) task demos how to setup a * single-threaded LITMUS^RT real-time task. */ /* First, we include standard headers. * Generally speaking, a LITMUS^RT real-time task can perform any * system call, etc., but no real-time guarantees can ...
/** ****************************************************************************** * @file main.c * @author MCD Application Team * @brief Main program ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2017 STMicroelect...
#include <config.h> #ifdef HAVE_LIMITS_H #include <limits.h> #endif #ifdef HAVE_LINUX_LIMITS_H #include <linux/limits.h> #endif #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include <term.h> #include <sys/ioctl.h> #includ...
/** * Copyright 2019-2020 DigitalOcean Inc. * Copyright 2021 <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://www.apache.org/licenses/LICENSE-2.0 * * ...
// Tachometer.c // Runs on MSP432 // Provide mid-level functions that initialize ports, take // angle and distance measurements, and report total travel // statistics. // <NAME> // December 20, 2018 /* This example accompanies the book "Embedded Systems: Introduction to Robotics, <NAME>, ISBN: 9781074544300, cop...
#include <stdio.h> #include <string.h> #define MAXSTR 256 #define MAXBUF 256 #define MAXINDEX 0x10000 char fontname[256]; int fwidth, fheight; int s_ch = 0xffff, e_ch = 0; int font_count = 0; int byte_count = 0; int font_start_byte = 0; int c_num = 0; unsigned int findex[MAXINDEX]; void tohpat(int ch, unsigned long...
/** @file ioboard_example.c @brief IO board example 3_ioboard_large_block. @author <NAME> @version 1.1 @date 26.4.2021 3_ioboard_large_block example is to test IO board communication performance with large block transfers. I use it with wireshark to make sure that TCP_NODELAY/TCP_CORK options ...
/* * implement x25519 diffie-hellman from [1]. * * This code is public domain. * * <NAME> <<EMAIL>> * * References: * [1] Curve25519: new Diffie-Hellman speed records, 2006/02/09, Bernstein. */ #include <stdint.h> #include <string.h> #include "eddsa.h" #include "fld.h" #include "burnstack.h" #include "ed.h...
/* * main.c * * Created on: Aug 23, 2019 * Author: dave */ //AXI GPIO driver #include "xgpio.h" //#include "sleep.h" //send data over UART #include "xil_printf.h" //information about AXI peripherals #include "xparameters.h" //#include "platform.h" #include "xsysmon.h" #define RX_BUFFER_SIZ...
/* Copyright (c) 2008-2010 <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, dist...
#include <stdio.h> #include <string.h> #define NMAX (5009) #define MMAX (50009) #define QMAX (50009) int min(int a, int b) { return a < b ? a : b; } struct queue { int que[QMAX]; int in_que[NMAX]; int que_top; int que_bot; void (*push)(struct queue *self, int x); int (*pop)(struct queue *self); int (*empty...
/* * Copyright (C) 1998 Exotec, Inc. * * This software is being provided by the copyright holders under the * following license. By obtaining, using and/or copying this software, * you agree that you have read, understood, and will comply with the * following terms and conditions: * * Permission to use, copy, ...
/* * Copyright (C) 2018 Beduino Master Projekt - University of Bremen * Copyright (C) 2019 HAW Hamburg * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @{ * @ingroup lwm2m_clie...
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* Allow the printf's that describe the contents of the file. Error messages use the printf routines */ /* style: allow:printf:12 sig:0 */ #include "rl...
// Copyright 2017 The Procyon Authors // // 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 agree...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* algo_short.c :+: :+: :+: ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/mman.h> #include <errno.h> #include <limits.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/time.h> #include <asm-generic/termbits.h> #include <assert.h> #include <pthread...
/********************************************************************************* MIT License Copyright (c) 2016 Microsoft 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, i...
// Copyright [2020] [FORTH-ICS] // // 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 ...
#include <tusb.h> #include <pico/stdlib.h> #include <hardware/uart.h> #include <hardware/irq.h> #include "keycodes.h" #define UART_KBD_ID uart1 #define UART_KBD_IRQ UART1_IRQ #define UART_KBD_TX_PIN 4 #define UART_KBD_RX_PIN 5 void on_keyboard_rx(); void keyboard_uart_init() { uart_init(UART_KBD_ID, 1200); gpi...
/* Extended Module Player * Copyright (C) 1996-2016 <NAME> and <NAME> * * 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...
/* timeout - times out the specified command after the specified * amount of time */ #include <sys/time.h> #include <sys/types.h> #include <sys/wait.h> #include <err.h> #include <getopt.h> #include <signal.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <sysexits.h> #include <unistd.h> /* ex...
#include <stdio.h> #include <machine/patmos.h> #include <stdint.h> #include <machine/spm.h> #include "i2c_master.h" //LEDs #define LED ( *( ( volatile _IODEV unsigned * ) PATMOS_IO_LED ) ) #define MPU6050_I2C_ADDRESS 0x68 //MCU6050 registers #define MPU6050_ACCEL_XOUT_H 0x3B // R #define MPU6050_ACCEL_XOUT_L ...
#include <FreeRTOS/FreeRTOS.h> #include <FreeRTOS/task.h> #include <custom.h> #include <cia.h> #include <exception.h> #include <interrupt.h> #include <trap.h> #include <cpu.h> #include <boot.h> #include <debug.h> extern void vPortStartFirstTask(void); extern void vPortYieldHandler(void); /* Exception Vector Base: 0 ...
/* * (C) Copyright 2008-2009 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. * * 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; ei...
#include <arpa/inet.h> #include <errno.h> #include <netdb.h> #include <netinet/in.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> void sigchld_handler(int _) { // waitpid() might modify the errno...
/* * Copyright 2016 GoPro Inc. * * 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, Vers...
#include "utility.h" void printMatrix(int **inputMatrix, int dim1, int dim2){ for(int i=0;i<dim1;i++){ for(int j=0;j<dim2;j++){ if(inputMatrix[i][j]<10) printf(" %d ",inputMatrix[i][j]); else if(inputMatrix[i][j]<100) printf(" %d ",inputMatrix[i][j]); else pri...
/* * @brief LPC540XX SPI master driver * * @note * Copyright(C) NXP Semiconductors, 2014 * All rights reserved. * * @par * Software that is described herein is for illustrative purposes only * which provides customers with programming information regarding the * LPC products. This software is supplied "AS IS...
/* * K2G EVM : Board initialization * * (C) Copyright 2015 * Texas Instruments Incorporated, <www.ti.com> * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <asm/arch/clock.h> #include <asm/ti-common/keystone_net.h> #include <asm/arch/psc_defs.h> #include <asm/arch/mmc_host_def.h> #inc...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <fcntl.h> #include <linux/input.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <netinet/in.h> #include <net/if.h> #include <arpa/inet.h> #include <netdb.h> #include <termios.h> ...
/*- * Copyright (c) 1988, 1993 * The Regents of the University of California. 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 copy...
/* * Sparc32 interrupt helpers * * Copyright (c) 2003-2005 <NAME> * * 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 of the License, or (at your option) any lat...
/* * Copyright (c) 2016 Intel Corporation * * 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 and the fol...
/* * @Author: <NAME> * @Date: 2018-12-12 20:06:16 * @Last Modified by: <NAME> * @Last Modified time: 2018-12-12 20:14:25 */ /* B-Tree Key = 2 Max no. of elements = 2n-1 = 3 Min no. of elements = ceil(n/2) = 1 currently only insertion */ #include <stdio.h> #include <stdlib.h> #define SIZE 2 typedef struct node {...
#include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-includes.h> #include <net-snmp/agent/snmp_agent.h> #include <net-snmp/agent/snmp_vars.h> #include "../hr_disk.h" #include <CoreFoundation/CoreFoundation.h> #include <IOKit/IOKitLib.h> #include <IOKit/storage/IOBlockStorageDriver.h> #include <IOKit/storag...
/* Copyright (c) 2020, Marvelmind Robotics All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fo...
#include "renderer.h" #include "utils.h" #include "stb_ds.h" #include "stb_truetype.h" #include "SDL.h" static SDL_Renderer *renderer; static stbtt_fontinfo default_font; static void set_surface_pixel_color( SDL_Surface *surface, int x, int y, uint8_t r, uint8_t g, uint8_t b, uint8_t a) { int off = y * surf...
/* Copyright (c) 2007, Adobe Systems, Incorporated All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and ...
/* * Thread safe hash table impl. using modulus on key (int type) as the hash function. * Bucket size is fixed and mutexs are attached to partitions of buckets. * HashTable accepts K, V with types int, int */ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <unistd.h> #include <string.h> #include <...
/* File: test5driver.c * * This test driver is used to demonstrate the use of * UTF utility to set return codes. * * Output can be directed either to screen or to file. * To direct output to screen, * comment in '#define UTF_USE_STDOUT' statement in the * utf_custom.h file. * * To direct out...
/* * HPACK encoding table generator. It produces a stream of * <len><idx><name> and a table pointing to the first <len> of each series. * The end of the stream is marked by <len>=0. In parallel, a length-indexed * table is built to access the first entry of each length. * * Build like this : * gcc -I../../inc...
/* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of ...
/* ISC license. */ #include <sys/uio.h> #include <errno.h> #include <limits.h> #include <string.h> #include <unistd.h> #include <signal.h> #include <sys/inotify.h> #include <skalibs/types.h> #include <skalibs/allreadwrite.h> #include <skalibs/sgetopt.h> #include <skalibs/strerr2.h> #include <skalibs/error.h> #include ...
// Copyright 2015-2019 Espressif Systems (Shanghai) PTE 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 requi...
#include <stdio.h> #include <stdlib.h> #include <mpi.h> #include "GeneralesBizantinos.h" const int SIN_DECISION = -1; const int NUMERO_DE_DECISIONES_POSIBLES = 2; const int ATACAR = 0; const int RETIRARSE = 1; const int DECISION= 1; int ponerse_acuerdo(const int proceso, const int num_proceso){ const int num_fa...
/* * 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...
/* ------------------------------------------------ * * The MIT License (MIT) * Copyright (c) 2019 <EMAIL> * ------------------------------------------------ */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <GLES2/gl2.h> #include "util_egl.h" #include "assertgl.h" #include "ut...
#include "graphserver.h" #include "hashtable/hashtable_gs.h" #include "hashtable/hashtable.h" #include <stdio.h> //SERVICE CALENDAR METHODS ServiceCalendar* scNew( ) { ServiceCalendar* ret = (ServiceCalendar*)malloc(sizeof(ServiceCalendar)); ret->head = NULL; ret->num_sids = 0; ret->sid_str_to_int = c...
/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Debug Mode */ /* #undef DEBUG */ /* Define to 1 if you have the declaration of `PRIi16', and to 0 if you don't. */ #define HAVE_DECL_PRII16 1 /* Define to 1 if you have the declaration of ...
// // Created by wangrl2016 on 2021/11/4. // #include <libavcodec/avcodec.h> #include <libavutil/channel_layout.h> /** * Check that a given sample format is supported by the encoder. * * @param codec 编码器 * @param sample_fmt 编码格式 * @return 是否支持 */ static int check_sample_fmt(const AVCodec* codec, enum AVSampleFo...
#include <conio.h> #include <stdio.h> #include <fcntl.h> #include <io.h> #define PARPORT 0x0378 #define BYTENUM 2068 unsigned char PORTBYTE = 0; unsigned char Data[4096]; #define CLK 0x08 #define DRB 0x04 #define DCA 0x02 #define DATA 0x01 #define SetBit( mask ) PORTBYTE |= (mask); outp( PARPORT, PORTBYTE )...
#include <hermit/syscall.h> #include <hermit/tasks.h> #include <hermit/spinlock.h> #include <hermit/logging.h> #include <asm/atomic.h> #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 #define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME) /* * ...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdarg.h> #include "ciron.h" #include "common.h" /** * Algorithms provided by ciron. * * If you add more algorithms here, you need to check and maybe adjust the * buffer size constants defined in common.h * * Also, you must add to the selectio...