text
stringlengths
3.08k
10.5k
/* * Copyright (c) 2011 <NAME>, Xenion Pty Ltd. * * 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 f...
/* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 <NAME>, <NAME> and <NAME> * * gthread.c: nspr thread system implementation * Copyright 1998 <NAME>; University of Karlsruhe * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Li...
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ #include "adio.h" #include "adio_extern.h" ADIOI_Async_node *ADIOI_Malloc_async_node(void) { /* returns a pointer to a new node that can be adde...
// SPDX-License-Identifier: BSD-2-Clause /* * Copyright (c) 2014, STMicroelectronics International N.V. * 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...
#include "rss.h" #include "config.h" #include "based.h" static void xmlencode(char *dst, char *src) { char semi, entity[5]; for (;*src != '\0'; ++src) { if (2 == sscanf(src, "&%4[^;]%c", entity, &semi) && semi == ';') { /* leave already encoded entities as they are */ dst += sprintf(dst, "&%s;", entity); ...
/* * Copyright (c) 2019, GreenWaves Technologies, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, this list...
// <NAME> 250206062 // gcc 562hw4partb.c -o 562hw4partb img_pro.c -lm // Usage: ./562hw4partb [center_x] [center_y] [d] [Image file (*.ppm)] // E.g. ./562hw4partb 200 150 20 tilt_shift_test1.ppm #include "img_pro.h" #include <math.h> #include <stdlib.h> #include <stdio.h> int summer(int array[],int len){ int ...
/* * Copyright 2014 ARM Ltd. * * Use of this software is governed by the MIT license */ #include <stdio.h> #include <stdlib.h> struct ComplexFloat { float Re; float Im; }; /* chemv - complex hermitian matrix-vector multiplication * The function body was taken from a VOBLA-generated BLAS library. */ void...
#include <stdlib.h> #include <SDL2/SDL.h> #include "game/protos/object.h" #include "game/scenes/mechlab.h" #include "game/scenes/mechlab/lab_main.h" #include "game/scenes/mechlab/lab_dashboard.h" #include "game/gui/frame.h" #include "game/gui/trn_menu.h" #include "game/utils/settings.h" #include "game/protos/scene.h" ...
/** * $Id: md5lib.c,v 1.10 2008/05/12 20:51:27 carregal Exp $ * Cryptographic and Hash functions for Lua * @author <NAME> */ #include <stdlib.h> #include <string.h> #include <time.h> #include <lua.h> #include <lauxlib.h> #if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 #include "compat-5.1.h" #endif #i...
/* $Id$ */ /* DO NOT EDIT - file generated by ObitTables.pl */ /*--------------------------------------------------------------------*/ /*; Copyright (C) 2015 */ /*; Associated Universities, Inc. Washington DC, USA. */ /*; ...
/* * * Copyright (c) International Business Machines Corp., 2001 * * 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 License, or * (at your option) any l...
/* Copyright (c) 2013 <NAME> <<EMAIL>> Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL ...
/* * sophia database * sphia.org * * Copyright (c) <NAME> * BSD License */ #include <libss.h> #include <libsf.h> #include <libsr.h> #include <libsv.h> #include <libsd.h> void sd_buildindex_init(sdbuildindex *i) { ss_bufinit(&i->v); ss_bufinit(&i->m); } void sd_buildindex_free(sdbuildindex *i, sr *r) { ss_bu...
/* -------------------------------------------------------------------------- * Name: imagecache.c * Purpose: Image cache * ----------------------------------------------------------------------- */ /* TODO * * - What should we do about changes to choices, e.g. sprite->jpeg * conversion? * For example: W...
/* This is a simple program with command line options to test running a program. */ #define MAXC 256 #include <stdio.h> #include <stdlib.h> #include <string.h> // Prototypes void parseCommandLine ( int argc, char **argv, char **env, int *exitcode, char *exitcodeenv, char *inputfile, char *inputfileenv, char *outp...
/* * Copyright Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file ...
#include "tokenize.h" #include "container.h" #include "util.h" #include <ctype.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> //新しいトークンを作成してcurrentに繋げる Token *new_token(TokenKind kind, Token *current, const char *string, int length) { Token *token = calloc(1, size...
/* * Copyright (c) 2019 - 2020 <NAME> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCL...
/** * Copyright 2017 Comcast Cable Communications Management, 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 requir...
/** *********************************************************************************************************************** * Copyright (c) 2020, China Mobile Communications Group Co.,Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the...
/* Copyright (C) 1997, <NAME> */ #include<math.h> #include<stdlib.h> #include"regfunal.h" static double sing_(int ityp, double pole, double width, int deg, double x) { double dx = x-pole; if (ityp == 1) { L1: if (deg ==2) return 1 / (dx * dx); else return 1 / ABS(dx); } else {...
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<time.h> #define MAX_FILE_NAME 100 #define MAX_TEXT_LENGTH 1000 #define MAX_SUBSTRING_LENGTH 20 void shiftTable(char*,int*,int,int); int BoyerMoore(char*,char*,int*,int*); int BoyerMoore_noncase(char*,char*,int*,int*); int abs_sub(char,char); void replace(...
/* * Unix SMB/CIFS implementation. * DOS error routines * Copyright (C) <NAME> 2002. * * 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 License, or * (at...
#include <assert.h> #include <signal.h> #include <stdatomic.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/shm.h> #include <unistd.h> #include "common/common.h" #include <sys/mman.h> #define SHM_SIZE_1M 0x100000 /* 1M */ #define SHM_SIZE_1G 0x40000000 /* 1G */ #define SHM_SIZE_8G 0x20000...
/* * Unix SMB/CIFS implementation. * Performance Counter Daemon * * Copyright (C) <NAME> 2005 * * 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 "base_includes.h" #include "cw_MQTTBROKER.h" #include "cw_MQTTPUBLISHER.h" #define DEBUG_LOG 0 //static const char* TAG = "MQTTPUBLISHER"; #define state_cw_INIT 1 struct cw_MQTTPUBLISHER_Vars { struct cw_MQTTPUBLISHER *m; unsigned int l_INIT; unsigned int *l_broker; Value *l_message; const char *l_topic...
/** \file ciamodelwidget.c * \brief Widget to set the CIA model * * \author <NAME> <<EMAIL>> */ /* * $VICERES CIA1Model x64 x64sc xscpu64 x64dtv x128 xcbm5x0 xcbm2 vsid * $VICERES CIA2Model x64 x64sc xscpu64 x64dtv x128 vsid */ /* * This file is part of VICE, the Versatile Commodore Emulator. * See ...
/* * Copyright (C) <NAME> * Copyright (C) PROGRESSART, Inc. */ #include <nginx.h> #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h> char *ngx_http_progressart_test_conf(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); void *ngx_http_progressart_test_create_loc_conf(ngx_conf_t *cf); char *ngx_h...
/* * YCSB Workload */ #include "headers.h" #include "workload-common.h" #define NB_REQ_PER_TRANSACTION 100 static char *_create_unique_item_trans(uint64_t uid) { size_t item_size = 1024; return create_unique_item(item_size, uid); } static char *create_unique_item_trans(uint64_t uid, uint64_t max_uid) { r...
/* Copyright (C) 2017 Beijing Didi Infinity Technology and Development 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 ...
/*- * MD5.C * * (c) Copyright 1997-1999 by <NAME> and <NAME>. Permission to * use and distribute based on the FreeBSD copyright. Supplied as-is, * USE WITH EXTREME CAUTION. * * $DragonFly: src/bin/cpdup/md5.c,v 1.3 2008/11/10 14:30:02 swildner Exp $ */ #include "cpdup.h" typedef struct MD5Node { ...
#pragma once #include <stdint.h> #include <stdbool.h> #include "ft2_unicode.h" enum { VOLUME_COLUMN_HIDDEN = 0, VOLUME_COLUMN_SHOWN = 1, TRANSP_ALL_INST = 0, TRANSP_CUR_INST = 1, TRANSP_TRACK = 0, TRANSP_PATT = 1, TRANSP_SONG = 2, TRANSP_BLOCK = 3 }; typedef struct trackHeaderType_t { ...
/* Copyright (c) 2020, 2021 <NAME> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS...
#include "idris_utf8.h" #include <string.h> #include <stdlib.h> int idris_utf8_strlen(char *s) { int i = 0, j = 0; while (s[i]) { if ((s[i] & 0xc0) != 0x80) j++; i++; } return j; } int idris_utf8_charlen(char* s) { int init = (int)s[0]; if ((init & 0x80) == 0) { return 1; // Top ...
/* * GRUB -- GRand Unified Bootloader * Copyright (C) 2010,2011 Free Software Foundation, Inc. * * GRUB 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...
/** * @file translateL3Math.c * @brief Translates infix formulas into MathML and vice-versa, using the L3 parser instead of the old L1 parser. * @author <NAME> * @author <NAME> * * * This file is part of libSBML. Please visit http://sbml.org for more * information about SBML, and the latest version of l...
#include <stdint.h> #ifdef INTPTR #undef INTPTR #endif #ifdef UINTPTR #undef UINTPTR #endif #define INTPTR int64_t #define UINTPTR uint64_t struct __array { INTPTR __vtbl; int64_t __mutex_lock; INTPTR elemtype; INTPTR lobounds; INTPTR sizes; I...
/* $NetBSD: rumpnfsd.c,v 1.9 2015/11/08 02:45:16 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. * * 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 r...
#define _GNU_SOURCE #include <assert.h> #include <ctype.h> #include <stdarg.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <stdnoreturn.h> #include <string.h> noreturn void error(char *fmt, ...) __attribute__((format(printf, 1, 2))); char *format(char *fmt, ...) __attribute...
#include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/queue.h" #include "sdkconfig.h" #include "esp_wifi.h" #include "esp_system.h" #include "esp_event.h" #include "esp_log.h" #include "esp_event_loop.h" #include "esp_sntp.h" #include "nvs_flash.h" #include "time.h" #include "sys/time.h" #inclu...
/* The Hacker's Choice - http://www.thc.org Part of THC's GSM SCANNER PROJECT */ #include "fire_crc.h" #include <stdio.h> #include <string.h> #define REM(x, y) (x) % (y) static int FC_syndrome_shift(FC_CTX *ctx, unsigned int bit); static int outit(int *data, int len) { int i; for (i = 0; i < len; i++) p...
#include <sys/types.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> // forward declarations for builtin functions int cd_cmd(char **args); int help_cmd(char **args); int history_cmd(char **args); int exit_cmd(char **args); // list of builtin commands char *built...
#include "gamedb.h" #include "games.h" #include <sqlite3.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct gamedb_t { sqlite3 *sql; } gamedb_t; gamedb_t *gamedb_open(const char *filename) { gamedb_t *db = (gamedb_t*)malloc(sizeof(gamedb_t)); if (filename == NULL || sqlite3_op...
/*************************************************************************** begin : Thu Jan 30 2003 copyright : (C) 2003 - 2009 by <NAME> email : <EMAIL> ***************************************************************************/ /********************************...
/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2017 Intel Corporation */ #include "opdl_evdev.h" #include "opdl_log.h" static const char * const port_xstat_str[] = { "claim_pkts_requested", "claim_pkts_granted", "claim_non_empty", "claim_empty", "total_cycles", }; void opdl_xstats_init(struct rte_e...
/****************************************************************************** * recordMyDesktop * ******************************************************************************* * * ...
#include "utils/utils.h" #define PF_BUF_SIZE 100005 #define MAX(a, b) ((a) > (b) ? a : b) #define TEST(title, code) \ BASE_TEST_OFFSET(12, title, { \ fprintf(errors_file, "For " CYN "%s" NC ":\n", title); \ int out_pipe[2]; ...
/* GENERATED FILE, DO NOT EDIT Generated from dcraw/dcraw.c at Mon May 4 22:14:56 2009 Look into original file (probably http://cybercom.net/~dcoffin/dcraw/dcraw.c) for copyright information. */ #line 28 "dcraw/dcraw.c" #define NO_JPEG #line 33 "dcraw/dcraw.c" #define VERSION "8.93" #define ...
#include "common/types.h" #include "common/swap.h" #include "sync/spinlock.h" #include "sync/semaphore.h" #include "mm/mm.h" #include "net/packet.h" #include "net/interface.h" #include "net/ip/ip.h" #include "net/ip/udp.h" #include "net/ip/dhcp.h" #include "net/ip/nbns.h" #include "log/log.h" #include "checksum.h" #d...
#include <cpu/paging.h> #include <panic.h> #include <sorted_list.h> #include <sys/hpet.h> #include <sys/ioapic.h> #include <sys/scheduler.h> #define HPET_REGISTER_CAPABILITIES 0 #define HPET_REGISTER_CONFIG 2 #define HPET_REGISTER_COUNTER 0x1e #define HPET_REGISTER_TIMERS_CONFIG 0x20 #define HPET_REGISTER_TIMERS_COMPAR...
#define MICROPY_HW_BOARD_NAME "NUCLEO-F413ZH" #define MICROPY_HW_MCU_NAME "STM32F413" #define MICROPY_HW_HAS_SWITCH (1) #define MICROPY_HW_HAS_FLASH (1) #define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1) #define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE_SEGMENT2 (1) #define MICROPY_HW_ENABL...
/*############################################################################ # Copyright 2017 Intel Corporation # # 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...
/** * Copyright (C) 2017, <NAME> **/ #include <string.h> #include <stdlib.h> #include <errno.h> #include <rocksdb/c.h> #include <jsonschema.h> #include <pstd.h> #include <options.h> #include <db.h> /** * @brief A used DB instance **/ typedef struct _db_t { struct _db_t* next; /*!< The linked list point...
#include "stdio.h" #include "dill.h" static int verbose = 0; int gg(int a, int b) { return a+b; } int ff(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j) { if (verbose) printf("In ff a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", a, b, c, d, e, f, g, h, i, j); r...
/** @file gursoy_atun_mex.c * @copyright Stanford University, 2008 * @author <NAME> * The mex interface to the matlab bgl wrapper. */ /** History * 2008-09-28: Initial version */ #include "mex.h" #if MX_API_VER < 0x07030000 typedef int mwIndex; typedef int mwSize; #endif /* MX_API_VER */ #include "matlab_bgl....
/* * libplayerc : a Player client library * Copyright (C) <NAME> 2002-2003 * * 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 License, or (at your option) a...
/*********************************************************************************** Autor: <NAME> Programa: Lista Estatica Desordenada Sem Arrasto. Aplicação ************************************************************************************/ #include <stdio.h> #include <stdlib.h> #include "li...
/* * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 * The President and Fellows of Harvard College. * * 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 ...
#pragma bank 3 #include "data/states_defines.h" #include "states/shmup.h" #include "actor.h" #include "camera.h" #include "collision.h" #include "data_manager.h" #include "game_time.h" #include "input.h" #include "trigger.h" #include "vm.h" #ifndef SHOOTER_HURT_IFRAMES #define SHOOTER_HURT_IFRAMES 10 #endif UINT8 s...
/*!**************************************************************************** @File buffer_omap.c @Title Graphics Allocator (gralloc) HAL component @Author Imagination Technologies @Date 2011/07/05 @Copyright Copyright (C) Imagination Technologies Limited. ...
#include "mex.h" #include <math.h> #include <limits.h> double** mallocdbl2( unsigned long i, unsigned long j ){ double **m; unsigned long ii; m = (double**)malloc( (unsigned long)i*sizeof(double*) ); for( ii=0; ii<i; ii++ ) m[ii] = (double*)malloc( (unsigned long)j*sizeof(double) ); return m; } double*** m...
/* * crypto_onetimeauth/try.c version 20090118 * <NAME> * Public domain. */ #include "crypto_hash_sha256.h" #include "crypto_onetimeauth.h" extern unsigned char *alignedcalloc(unsigned long long); const char *primitiveimplementation = crypto_onetimeauth_IMPLEMENTATION; #define MAXTEST_BYTES 10000 #define CHECKS...
/* * libkb * * Handles translations of raw scancodes into usable characters */ #include "kb.h" unsigned int us_map[128] = { [0x01] = KEY_ESCAPE, [0x02] = '1', [0x03] = '2', [0x04] = '3', [0x05] = '4', [0x06] = '5', [0x07] = '6', [0x08] = '7', [0x09] = '8', [0x0a] = '9', ...
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/wait.h> #define DEBUG true bool decrypt(char* name, char* device, char* options, char* password); bool mount(char* mountpoint); char *strstrip(char *s); void show_password_prompt(char* arg0); void usage()...
#include <monitor.h> #include <kalloc.h> #include <klib.h> #include <lib/string.h> #include <system.h> #include <types.h> static void print_cpu_id(void); static void print_cache_type(void); static void print_tcm_type(void); static void print_tlb_type(void); static void print_control_register(void); static void print_c...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <math.h> #include "mochila.h" void trocar (int *a, int *b) { int aux = *b; *b = *a; *a = aux; } int pesoSolucao (int n, int *solucao, Item *vetorItem) { int somatorio = 0; for (int i = 0; i < n; i++) { if (solucao[...
/******************************************************************************/ /***************************** Include Files *********************************/ #include <stdio.h> #include <stdlib.h> #include "xil_io.h" #include "xil_exception.h" #include "xparameters.h" #include "xil_cache.h" #include "xil_printf.h"...
/************************************************************************** Impulsformer - device to transform a voltage delivered from a current clamp to an S0-output with 1000 pulses per kilo-Watt-hour Uses an Atmel ATtiny13(A)) - Copyright 2012 <NAME> Changed oscillator setting 4,8MHz with prescaling by 8 to 600kH...
/* * Copyright (c) 2018, <NAME> * */ /////////////////////////////////////////////////////////////////////////////// // Includes /////////////////////////////////////////////////////////////////////////////// //Included files from std #include <predictor.h> #include <string.h> //Included board con...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <mmu.h> #define NUMPROCS 4 #define PAGESIZE 4096 #define PHISICALMEMORY 12 * PAGESIZE #define TOTFRAMES PHISICALMEMORY / PAGESIZE #define RESIDENTSETSIZE PHISICALMEMORY / (PAGESIZE * NUM...
#include "console.h" #include "telnet.h" #include "textio.h" #include "vars.h" #include "common.h" #include <assert.h> #include <ctype.h> #include <stdlib.h> #include <stdio.h> #include <string.h> struct SCPI { int Chan; int ChanAvail; STRBUF Scpi; STRBUF Ext; STRBUF Value; int Request; }; vo...
/* * Copyright (C) 2014 Altera Corporation <www.altera.com> * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <asm/io.h> #include <watchdog.h> #include <asm/arch/system_manager.h> #include <asm/arch/reset_manager.h> #include <phy.h> #include <micrel.h> #include <miiphy.h> #include <netdev.h> #i...
/** ****************************************************************************** * * @file bl_v7.c - Support for v7 platform * * Copyright (C) BouffaloLab 2017-2021 * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You ...
#include "dma.h" #include "ktypes.h" #include "panic.h" #include "ports.h" #include "printk.h" #include "task.h" #include <sys/types.h> /* ports that are on the actual DMA chips */ #define DMA8_START_PORT(ch) (((ch) & 0x03) << 1) #define DMA8_COUNT_PORT(ch) (DMA8_START_PORT(ch) + 1) #define DMA8_STATUS_PO...
/** * @file serial_transport_win32.c * @brief Mercury API - Serial transport over local serial port on Win32 * @author <NAME> * @date 10/20/2009 */ /* * Copyright (c) 2010 ThingMagic, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated d...
// Copyright 2021 IOsetting <iosetting(at)outlook.com> // // 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 applic...
#include <u.h> #include <libc.h> #include <auth.h> #include <fcall.h> static void dumpsome(char*, char*, long); static void fdirconv(char*, Dir*); int fcallconv(void *v, Fconv *f1) { Fcall *f; int fid, type, tag, n; char buf[512]; Dir d; f = *(Fcall **)v; type = f->type; fid = f->fid; tag = f->tag; switch(t...
// // KSFileUtils.c // // Created by <NAME> on 2012-01-28. // // Copyright (c) 2012 <NAME>. All rights reserved. // // 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, ...
#include <kipr/botball.h> #include <stdbool.h> //notes // void line_follower(); void reverse_line_follower(); bool fire_scan(double red_benchmark); void drive(); void turn(); void drive_until_line(); void servo_change(int op, int wp, int servoport, int speed); void scan_buildings(); void raise_claw(); void l...
/* * GRUB -- GRand Unified Bootloader * Copyright (C) 1992-1999,2001,2003,2004,2005,2009 Free Software Foundation, Inc. * * GRUB 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...
/* * Copyright (C) by Argonne National Laboratory * See COPYRIGHT in top-level directory */ /* Header protection (i.e., ISCAN_TSP_RECURSIVE_DOUBLING_ALGOS_H_INCLUDED) is * intentionally omitted since this header might get included multiple * times within the same .c file. */ #include "algo_common.h" #include...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * test_oid.c * * Test OID Types * */ #include "testutil.h" #include "testutil_nss.h" static void *plConte...
#include "sd.h" #include "spi.h" #include "uart.h" // spi full duplex: send 0xff to receive byte uint8_t sd_dummy() { return spi_txrx(0xFF); } uint8_t sd_cmd(uint8_t cmd, uint32_t arg, uint8_t crc) { unsigned long n; uint8_t r; sd_dummy(); spi_txrx(0x40 | cmd); spi_txrx(arg >> 24); spi_tx...
/******************************************************************************* * Copyright (c) 2018 Arrow Electronics, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License 2.0 * which accompanies this distribution, and is available at * htt...
#include "v.h" #include "x.h" #include "evr.h" #define CENTER_MOLECULES Display * dis; int screen; Window win; GC gc_white, gc_black, gc_dot[2], gcc[NCOLORS]; Pixmap px; Drawable canv; XFontStruct * fontInfo; int W,H; int (*myDrawString)(); static void init_keys(ptf kp[NKP]){ memset(kp, 0,...
/* * alock - auth_hash.c * Copyright (c) 2014 - 2016 <NAME> * * This file is a part of an alock. * * This project is licensed under the terms of the MIT license. * * This authentication module provides: * -auth hash:type=<type>,hash=<hash>,file=<filename> * */ #include "alock.h" #include <ctype.h> #includ...
/* To be built with arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m0 -O3 bluenrgx.c */ /* Then postprocess output of command "arm-none-eabi-objdump -d bluenrgx.o" to make a C array of bytes */ #include <stdint.h> /* Status Values ----------------------------------------------------------*/ #define SUCCESS 0 #...
/* * sirds - create a single image random dot stereogram from a depth image * * usage: sirds [-s stripwidth] [-d] [-f [size]] * <depthimage >stereogramimage * * stripwidth defaults to 20. The largest value in depthimage must be less * than the value of stripwidth. -d specifies that the stereogram is set for...
// Copyright 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once // --------------------------------------------------------------------------- // Note: We generate files vdb_topology_<level>.h from this // template using CMake. // --------------------------------------------------------...
/**************************************************************************/ /*! @file magnetometers.c @author <NAME>, <NAME> @ingroup Sensors @brief Helper functions for magnetometers @code error_t error; sensors_event_t mag_event; sensors_vec_t orientation; // Initial...
// // Created by <NAME> on 1/15/18. // Copyright (c) 2018 and beyond. <NAME> #include "codeP.h" #include <assert.h> #include <labelsP.h> #include "formioP.h" #include "labels.h" #include "consP.h" #include "ideal.h" static termPo termFinalizer(specialClassPo class, termPo o); SpecialClass SpecialClss = { .clss = N...
#include <stdio.h> #define PY_SSIZE_T_CLEAN #include <Python.h> #define SIZE 8 /* Create an 8x8 board with * 0: empty square * 1: black stone * 2: white stone */ static unsigned char board[SIZE][SIZE]; // Converts signed char in board to meaningful character static char convert(unsigned char c) { if (c == ...
#include "graphics.h" #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include "glad.h" #include <GLFW/glfw3.h> #include <cglm/struct.h> #include "shader.h" #include "texture.h" #include "util.h" #include "window.h" #include "noise.h" #include "camera.h" #include "chunk_common.h" window...
/** * @Filename: Task_BMP180_Handler.c * @Author: <NAME> and <NAME> * @Email: <EMAIL> * @Email: <EMAIL> * @Created: October 2nd, 2018 [1:10pm] * @Modified: October 18th, 2018 [6:41am] * @Version: 1.0.0 * * @Description: Periodically read and report temperature and pressure * * Copyright (C) 2018 by <NAME> and...
/* Implements the foreign function interface (FFI) used in the CakeML basis library, as a thin wrapper around the relevant system calls. */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/time.h> #include <assert.h> /* clFFI (com...
/******************************************************************************* * * Copyright (c) 2013, 2014 Intel Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * and Eclipse Distribution License v...
/****************************************************************************//** * @file main.c * @version V0.10 * @brief Demonstrate how to use FMC CRC32 ISP command to calculate the CRC32 checksum of APROM and LDROM. * * SPDX-License-Identifier: Apache-2.0 * @copyright (C) 2018 Nuvoton Technology Corp....
#define thisprog "xe-distvel3" #define TITLE_STRING thisprog" v 2: 2.August.2012 [JRH]" #define MAXLINELEN 1000 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> /* <TAGS>signal_processing math</TAGS> v 2: 2.August.2012 [JRH] - replace "-" with "nan" for missing values */ /* external fun...
#include "fs_metadata.h" int iniciar_semaforos() { if (pthread_mutex_init(&mutex_bitmap, NULL) != 0) return -1; pthread_mutex_lock(&mutex_bitmap); //Este semáforo nace bloqueado y se desbloquea cuando se inicializa bitmap return 0; } int iniciar_constantes() { FS_BLOCK_SIZE = 64; FS_BLOC...