about summary refs log tree commit diff stats
path: root/client.c
Commit message (Collapse)AuthorAgeFilesLines
* removed TLast tag enum, now tags is simple defined as char *[] array, the ↵arg@10ksloc.org2006-08-031-1/+3
| | | | rest is calculated correctly, rules take an int array for the tags
* changed Client->tags and Rule->tags to be Bool (I'll also try to remove the ↵arg@10ksloc.org2006-08-031-1/+1
| | | | TLast enum)
* made fullscreen apps working fine in floating mode (there is no sane way to ↵arg@10ksloc.org2006-08-021-22/+10
| | | | make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
* new stuffarg@10ksloc.org2006-08-021-15/+21
|
* implemented focus on enterwindow on titlebarsarg@10ksloc.org2006-08-021-1/+1
|
* reverting to old resize policyarg@10ksloc.org2006-08-021-11/+19
|
* new resize stuff (using XConfigureWindow instead of XSendEvent)arg@10ksloc.org2006-08-021-19/+11
|
* renamed WM_PROTOCOL_DELWIN into PROTODELWINarg@10ksloc.org2006-08-011-1/+1
|
* removed artefacts of single-linked list (thanx to Jukka, I must have been mad)arg@10ksloc.org2006-08-011-8/+3
|
* uppercasing all define'd values (uppercase-prefixed should only be enum ↵arg@10ksloc.org2006-08-011-3/+3
| | | | field qualifiers)
* applied Sanders patchesarg@10ksloc.org2006-08-011-3/+3
|
* committed a patch which fixes the hints of Jukkaarg@10ksloc.org2006-08-011-34/+8
|
* sanitization of several clunky stuff, removed heretag (rarely of use), ↵arg@10ksloc.org2006-07-211-2/+15
| | | | simplified pop(), changed shortcuts to always contain MODKEY
* applied sanders no_sizehints for tiled mode patch (thx!)arg@10ksloc.org2006-07-201-10/+10
|
* serious mistake in pop() (forgot to set c->prev to NULL on pop)arg@10ksloc.org2006-07-201-0/+1
|
* using double-linked list in order to get correct prev focus handlingarg@10ksloc.org2006-07-201-15/+31
|
* made status bar drawing more robust, implemented togglemax and togglemode, ↵arg@10ksloc.org2006-07-201-15/+38
| | | | works quite well
* cleaned up codearg@10ksloc.org2006-07-201-6/+10
|
* removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling ↵arg@10ksloc.org2006-07-201-76/+52
| | | | remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
* implemented regexp matching for rulesarg@10ksloc.org2006-07-191-2/+3
|
* applied Jukka's patch with s/ModKeyMask/MODKEY/garg@10ksloc.org2006-07-191-3/+3
|
* fixed the bug mentioned by Sanderarg@10ksloc.org2006-07-191-3/+7
|
* refactored Sanders code somewhatarg@10ksloc.org2006-07-191-2/+2
|
* implemented fallback for too many clients in stacked modearg@10ksloc.org2006-07-191-2/+3
|
* and another fix...arg@10ksloc.org2006-07-191-1/+1
|
* yet another typo fixarg@10ksloc.org2006-07-191-2/+2
|
* fixed a typoarg@10ksloc.org2006-07-191-1/+1
|
* floating clients get random (x,y) offsets nowarg@10ksloc.org2006-07-191-0/+7
|
* applied Sanders resize patch, fixed lower bugarg@10ksloc.org2006-07-191-2/+8
|
* implemened distinguishing float/managed geometries of clients (works quite well)Anselm R. Garbe2006-07-181-48/+68
|
* pop on heretagAnselm R. Garbe2006-07-181-7/+14
|
* added heretag command which allows to tag a client of a foreign tag with ↵Anselm R. Garbe2006-07-181-4/+4
| | | | current tag
* another XSyncAnselm R. Garbe2006-07-161-0/+1
|
* several additions in mouse handling ;)Anselm R. Garbe2006-07-161-6/+7
|
* fixed XSync handling and finished man pageAnselm R. Garbe2006-07-151-4/+3
|
* sanitized other stuffAnselm R. Garbe2006-07-151-2/+2
|
* proceeded with cleaning up, sorting functions, etcAnselm R. Garbe2006-07-151-205/+206
|
* rearranged several stuffAnselm R. Garbe2006-07-151-58/+87
|
* sanitized namesAnselm R. Garbe2006-07-141-14/+14
|
* rearrangedAnselm R. Garbe2006-07-141-227/+3
|
* bar shows if currently is tiled (Mod1-space) or floating (Mod1-Shift-space) modeAnselm R. Garbe2006-07-141-0/+2
|
* fixed crash on zoom if only 1 client existsAnselm R. Garbe2006-07-141-3/+9
|
* removed a bunch of lines through swap removalAnselm R. Garbe2006-07-141-2/+2
|
* searching for a better way to discard enter notifiesAnselm R. Garbe2006-07-141-13/+11
|
* focus on view change as wellAnselm R. Garbe2006-07-141-0/+3
|
* made stdin reader more robustAnselm R. Garbe2006-07-141-4/+9
|
* implemented bar for dwm (I miss status text), I plan that status text is ↵Anselm R. Garbe2006-07-141-12/+18
| | | | read from stdin in dwm
* continued with man pageAnselm R. Garbe2006-07-141-1/+1
|
* except improvements to the mouse handling this is already nearly feature ↵Anselm R. Garbe2006-07-131-0/+5
| | | | complete
* added mini stuffAnselm R. Garbe2006-07-131-20/+31
|
ew_code = $_[1]; my $comments = $_[2]; # printf "# make_row %d %d %s\n", $old_code, $new_code, $comments; my $visible = sprintf("&amp;#%d; ", $new_code); if ($old_code < 256) { printf FP "%4x %c %.13s &#%d; %s\n", $old_code, $old_code, $visible, $new_code, &escaped($comments); } else { printf FP "%4x . %.13s &#%d; %s\n", $old_code, $visible, $new_code, &escaped($comments); } } sub null_row($$) { my $old_code = $_[0]; my $comments = $_[1]; if ($old_code < 256) { printf FP "%4x %c %s\n", $old_code, $old_code, &escaped($comments); } else { printf FP "%4x . %s\n", $old_code, &escaped($comments); } } sub make_footer() { printf FP "</PRE>\n"; printf FP "</BODY>\n"; printf FP "</HTML>\n"; } # return true if the string describes a range sub is_range($) { return ($_[0] =~ /.*-.*/); } # convert the U+'s to 0x's so strtod() can convert them. sub zeroxes($) { my $result = $_[0]; $result =~ s/^U\+/0x/; $result =~ s/-U\+/-0x/; return $result; } # convert a string to a number (-1's are outside the range of Unicode). sub value_of($) { my ($result, $oops) = strtod($_[0]); $result = -1 if ($oops ne 0); return $result; } # return the first number in a range sub first_of($) { my $range = &zeroxes($_[0]); $range =~ s/-.*//; return &value_of($range); } # return the last number in a range sub last_of($) { my $range = &zeroxes($_[0]); $range =~ s/^.*-//; return &value_of($range); } sub one_many($$$) { my $oldcode = $_[0]; my $newcode = &zeroxes($_[1]); my $comment = $_[2]; my $old_code = &value_of($oldcode); if ( $old_code lt 0 ) { printf "? Problem with number \"%s\"\n", $oldcode; } else { &make_mark if (( $old_code % 8 ) == 0 ); if ( $newcode =~ /^#.*/ ) { &null_row($old_code, $comment); } elsif ( &is_range($newcode) ) { my $first_item = &first_of($newcode); my $last_item = &last_of($newcode); my $item; if ( $first_item lt 0 or $last_item lt 0 ) { printf "? Problem with one:many numbers \"%s\"\n", $newcode; } else { if ( $comment =~ /^$/ ) { $comment = sprintf("mapped: %#x to %#x..%#x", $old_code, $first_item, $last_item); } else { $comment = $comment . " (range)"; } for $item ( $first_item..$last_item) { &make_row($old_code, $item, $comment); } } } else { my $new_code = &value_of($newcode); if ( $new_code lt 0 ) { printf "? Problem with number \"%s\"\n", $newcode; } else { if ( $comment =~ /^$/ ) { $comment = sprintf("mapped: %#x to %#x", $old_code, $new_code); } &make_row($old_code, $new_code, $comment); } } } } sub many_many($$$) { my $oldcode = $_[0]; my $newcode = $_[1]; my $comment = $_[2]; my $first_old = &first_of($oldcode); my $last_old = &last_of($oldcode); my $item; if (&is_range($newcode)) { my $first_new = &first_of($newcode); my $last_new = &last_of($newcode); for $item ( $first_old..$last_old) { &one_many($item, $first_new, $comment); $first_new += 1; } } else { for $item ( $first_old..$last_old) { &one_many($item, $newcode, $comment); } } } sub approximate($$$) { my $values = $_[0]; my $expect = sprintf("%-8s", $_[1]); my $comment = $_[2]; my $escaped = &escaped($expect); my $left; my $this; my $next; $escaped =~ s/\\134/\\/g; $escaped =~ s/\\015/\&#13\;/g; $escaped =~ s/\\012/\&#10\;/g; while ( $escaped =~ /^.*\\[0-7]{3}.*$/ ) { $left = $escaped; $left =~ s/\\[0-7]{3}.*//; $this = substr $escaped,length($left)+1,3; $next = substr $escaped,length($left)+4; $escaped = sprintf("%s&#%d;%s", $left, oct $this, $next); } my $visible = sprintf("&amp;#%d; ", $values); if ($values < 256) { printf FP "%4x %c %.13s &#%d; approx: %s\n", $values, $values, $visible, $values, $escaped; } else { printf FP "%4x . %.13s &#%d; approx: %s\n", $values, $visible, $values, $escaped; } } sub doit($) { my $source = $_[0]; printf "** %s\n", $source; my $target = basename($source, ".tbl"); # Read the file into an array in memory. open(FP,$source) || do { print STDERR "Can't open input $source: $!\n"; return; }; my (@input) = <FP>; chomp @input; close(FP); my $n; my $charset = ""; my $official = ""; my $empty = 1; for $n (0..$#input) { $input[$n] =~ s/\s*$//; # trim trailing blanks $input[$n] =~ s/^\s*//; # trim leading blanks $input[$n] =~ s/^#0x/0x/; # uncomment redundant stuff next if $input[$n] =~ /^$/; next if $input[$n] =~ /^#.*$/; if ( $empty and ( $input[$n] =~ /^\d/ or $input[$n] =~ /^U\+/ ) ) { $target = $charset . ".html"; printf "=> %s\n", $target; open(FP,">$target") || do { print STDERR "Can't open output $target: $!\n"; return; }; &make_header($source, $charset, $official); $empty = 0; } if ( $input[$n] =~ /^M.*/ ) { $charset = $input[$n]; $charset =~ s/^.//; } elsif ( $input[$n] =~ /^O.*/ ) { $official = $input[$n]; $official =~ s/^.//; } elsif ( $input[$n] =~ /^\d/ ) { my $newcode = &field($input[$n], 1); next if ( $newcode eq "idem" ); next if ( $newcode eq "" ); my $oldcode = &field($input[$n], 0); if ( &is_range($oldcode) ) { &many_many($oldcode, $newcode, &notes($input[$n])); } else { &one_many($oldcode, $newcode, &notes($input[$n])); } } elsif ( $input[$n] =~ /^U\+/ ) { if ( $input[$n] =~ /^U\+\w+:/ ) { my $values = $input[$n]; my $expect = $input[$n]; $values =~ s/:.*//; $values = &zeroxes($values); $expect =~ s/^[^:]+://; if ( &is_range($values) ) { printf "fixme:%s(%s)(%s)\n", $input[$n], $values, $expect; } else { &approximate(&value_of($values), $expect, &notes($input[$n])); } } else { my $value = $input[$n]; $value =~ s/\s*".*//; $value = &value_of(&zeroxes($value)); if ($value gt 0) { my $quote = $input[$n]; my $comment = &notes($input[$n]); $quote =~ s/^[^"]*"//; $quote =~ s/".*//; &approximate($value, $quote, $comment); } else { printf "fixme:%d(%s)\n", $n, $input[$n]; } } } else { # printf "skipping line %d:%s\n", $n + 1, $input[$n]; } } if ( ! $empty ) { &make_footer(); } close FP; } sub usage() { print <<USAGE; Usage: $0 [tbl-files] The script writes a new ".html" file for each input, using the same name as the input, stripping the ".tbl" suffix. USAGE exit(1); } if ( $#ARGV < 0 ) { usage(); } else { while ( $#ARGV >= 0 ) { &doit ( shift @ARGV ); } } exit (0);