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
HANG: ANSI_X3.110; echo -en "\x00\x23" | iconv -c -f ANSI_X3.110 -t "UTF-8//TRANSLIT//IGNORE" | |
HANG: ARMSCII-8; echo -en "\x00\xa1" | iconv -c -f ARMSCII-8 -t "UTF-8//TRANSLIT//IGNORE" | |
HANG: ASMO_449; echo -en "\x00\xa1" | iconv -c -f ASMO_449 -t "UTF-8//TRANSLIT//IGNORE" | |
HANG: BIG5; echo -en "\x00\x81" | iconv -c -f BIG5 -t "UTF-8//TRANSLIT//IGNORE" | |
HANG: BIG5HKSCS; echo -en "\x00\xff" | iconv -c -f BIG5HKSCS -t "UTF-8//TRANSLIT//IGNORE" | |
HANG: BRF; echo -en "\x00\xff" | iconv -c -f BRF -t "UTF-8//TRANSLIT//IGNORE" | |
HANG: BS_4730; echo -en "\x00\xff" | iconv -c -f BS_4730 -t "UTF-8//TRANSLIT//IGNORE" | |
OK: CP10007 | |
OK: CP1125 | |
HANG: CP1250; echo -en "\x00\x81" | iconv -c -f CP1250 -t "UTF-8//TRANSLIT//IGNORE" |
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/sh -f | |
# Run iconv(1) tests with every possible input combination of two bytes. | |
# Copyright (C) 2019 Free Software Foundation, Inc. | |
# This file is part of the GNU C Library. | |
# Contributed by Arjun Shankar <[email protected]>, 2019. | |
# The GNU C Library is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU Lesser General Public | |
# License as published by the Free Software Foundation; either | |
# version 2.1 of the License, or (at your option) any later version. |
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
# HDI vs Irreligion; | |
# Source: | |
# https://en.wikipedia.org/wiki/List_of_countries_by_irreligion | |
# https://en.wikipedia.org/wiki/List_of_countries_by_Human_Development_Index | |
# gnuplot command line: | |
# echo "set xlabel 'Irreligion (% of population)'; set xrange [0:100]; \ | |
# set ylabel 'HDI'; set term png size 1024,768; \ | |
# set output 'hdi-vs-irreligion.png'; \ | |
# f(x) = a*x + b; a=0.003;b=0.7; \ | |
# fit f(x) 'hdi-vs-irreligion.data' using 2:3 via a,b; \ |
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
#!/usr/bin/perl | |
# Reads STDIN as 'Outlook CSV' (e.g. contacts exported from GMail webUI). | |
# Writes to STDOUT as mutt aliases | |
# | |
# Example usage: | |
# | |
# perl csv2muttalias.pl < contacts.csv >> ~/.muttrc | |
use strict; |
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
/* | |
$ gcc -Wall -pedantic -o test-stack-switching test-stack-switching.c | |
$ valgrind ./test-stack-switching | |
Expected program output: | |
> 55 | |
> 55 | |
> 55 | |
Expected valgrind output: Three warnings that look like; |
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 | |
SRC_DIR=~/src/glibc/ | |
pushd $SRC_DIR &> /dev/null \ | |
|| { echo Unable to enter directory $SRC_DIR 1>&2; exit 1; } | |
let blkl=0 | |
let good=0 | |
let main=0 |
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 <stdio.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <unistd.h> | |
const char *data = "zzzzzzzzzz"; | |
const char *more_data = "aaaaaaaaaa"; | |
#define TEST_FILE_PATH "tst-rewind-ftell.out" |
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 | |
# TODO: Parse and report testsuite failures; | |
# fetch and execute gnulib testsuite. | |
GT_NAME=glibc-tester | |
GT_DIR=$HOME/.$GT_NAME | |
GT_CONFIG=$GT_DIR/config | |
if [ ! -d $GT_DIR ]; then |
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
/* | |
gcc -O0 -std=c99 -pedantic -Wall -Werror -lpthread \ | |
-o hello-pthread hello-pthread.c | |
*/ | |
/* Enable 2008 edition functionality of POSIX.1, | |
required for pthread_rwlock_* functions. */ | |
#define _POSIX_C_SOURCE 200809L | |
#include <stdio.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
#include <stdio.h> | |
#include <string.h> | |
unsigned int stack_size; | |
struct huge_argument /* Not the verbal kind ;). */ | |
{ | |
char x[512]; | |
}; |
NewerOlder