Catégories: Programmation, Awk, Bash, C, C++, Perl, Tcl/Tk

Pages: 1 2 >>

03.01.12

Permalink 03:59:00 pm, by mazet Email , 55 words   English (US) latin1
Categories: Programmation, Awk

Convertion from hexa to decinal

Simple function to convert hexadecimal figures to decimal. It need to define a constant table hex BEGIN { for (i=0; i<10; i++) hex[i] = i hex["a"] = hex["A"] = 10 hex["b"] = hex["B"] = 11 hex["c"] = hex["C"] = 12 hex["D"… more »
Permalink 03:51:00 pm, by mazet Email , 50 words   English (US) latin1
Categories: Programmation, Awk

Asort for Mawk

Mawk does not provide asort function to sort array. function alength(A, n, val) { n = 0 for (val in A) n++ return n } function asort(A, hold, i, j, n) { n = alength(A) for (i = 2; i <= n ; i++) { hold = A[… more »

13.12.11

Permalink 05:35:00 pm, by mazet Email , 32 words   English (US) latin1
Categories: Programmation, C

Link statically only some specific libraries to a binary

You could also use ld option -Bdynamic gcc mixer.o \ -Wl,-Bstatic -lapplejuice \ -Wl,-Bdynamic -lorangejuice \ -o multifruitjuice All libraries after it (including system ones linked by gcc automatically) will be linked dynamica… more »

17.11.09

Permalien 20:24:30, par mazet Email , 245 mots   French (FR) latin1
Catégories: Programmation, Perl

Extraire des commentaires d'un fichier C/C++

Extraction de commentaires d'un fichier C/C++ (toute la puissance du perl) #!/usr/bin/perl use strict; # default value my $format = "%"; my $pattern = ""; # help message sub usage() { print <<EOF; usage: getcomments [-f stri… suite »
Permalien 20:20:17, par mazet Email , 618 mots   French (FR) latin1
Catégories: Programmation, Bash

Fichier de ressource Bash

Fichier de resource .bashrc redefinissant rm (deplacement vers ~/.wastebasket) # -*- sh -*- # # If not running interactively, don't do anything [ -z "$PS1" ] && return # User preferences export NAME="Laurent Mazet" export EMAIL=… suite »

1 2 >>