This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/image.c b/image.c | |
| index f22fc6f..36fbe46 100644 | |
| --- a/image.c | |
| +++ b/image.c | |
| @@ -257,9 +257,9 @@ void image_transform_fast_rev( struct image *image ) | |
| void image_transform( struct image *image ) | |
| { | |
| int x, y, i, width, height, aerr, berr, cerr, ia, ib, ic; | |
| - struct pixel p; | |
| + struct pixel a, b, c, p; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* counter_stdio.c */ | |
| #include <stdio.h> | |
| int main() { | |
| int i = 0; | |
| for (;;i++) fwrite(&i,sizeof i,1,stdout); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ppm | |
| import "fmt" | |
| import "io" | |
| import "testing" | |
| // io.Reader for TestFscanf. We use our own reader to be sure that pushing back | |
| // is not supported. | |
| type fscanfTestReader struct { | |
| content []byte |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax "go" "\.go$" | |
| # types | |
| color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>" | |
| color green "\<((<-[[:space:]]*)chan|chan[[:space:]]*<-|const|func|interface|map|struct|type|var)\>" | |
| # predefined functions | |
| color blue "\<(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\>" | |
| # control flow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # usage: bench.sh <number of commits> | |
| FILE=foo | |
| BENCHDIR=bench-$1 | |
| git init $BENCHDIR | |
| cd $BENCHDIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdint.h> | |
| extern uint32_t | |
| read_le32( | |
| uint8_t data[4] | |
| ) { | |
| register uint32_t res = 0; | |
| res |= data[0] << 0; | |
| res |= data[1] << 8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -e | |
| # preprocess an assembly file with cc -E, throwing out C code from system | |
| # header files in the process. This is neccessary as some Linux headers with | |
| # valuable symbolic constants also contain C code we do not want. This script | |
| # gets rid of these. | |
| # | |
| # Please notice that this script does not remove C code from header included | |
| # from local includes. Please also notice that this script eats line directives | |
| # from included files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/wait.h> | |
| #include <unistd.h> | |
| #define SHELL "/bin/sh" | |
| extern int main(int, char*[]); | |
| static int readingend(int, int, const char*); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*- | |
| * Copyright (c) 2014 Robert Clausecker <[email protected]> | |
| */ | |
| #define _POSIX_C_SOURCE 200809L | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include "err.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*- | |
| * Copyright (c) 2014 Robert Clausecker | |
| */ | |
| /* | |
| * parse_mode() - parse an octal or symbolic mode string into a mode_t | |
| */ | |
| #define _XOPEN_SOURCE 700 | |
| #include <stdlib.h> |