diff options
| author | Anselm R. Garbe <garbeam@gmail.com> | 2007-08-04 10:57:56 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@gmail.com> | 2007-08-04 10:57:56 +0200 |
| commit | da91dfc948e3c66ac491bbdd1424a33aadbb5265 (patch) | |
| tree | ac71659fffb52e1eb1b9df0fa020d433d7ee7fce | |
| parent | I introduced {H,V}RATIO and inc{h,v,}ratio() functions - the default behaves ... (diff) | |
| download | dwm-da91dfc948e3c66ac491bbdd1424a33aadbb5265.tar.gz dwm-da91dfc948e3c66ac491bbdd1424a33aadbb5265.zip | |
small fix of static function order
Diffstat (limited to '')
| -rw-r--r-- | layout.c | 36 |
1 files changed, 18 insertions, 18 deletions
| @@ -13,24 +13,6 @@ static double vratio = VRATIO; | |||
| 13 | static unsigned int nlayouts = 0; | 13 | static unsigned int nlayouts = 0; |
| 14 | static unsigned int nmaster = NMASTER; | 14 | static unsigned int nmaster = NMASTER; |
| 15 | 15 | ||
| 16 | static void | ||
| 17 | incratio(const char *arg, double *ratio, double def) { | ||
| 18 | double delta; | ||
| 19 | |||
| 20 | if(lt->arrange != tile) | ||
| 21 | return; | ||
| 22 | if(!arg) | ||
| 23 | *ratio = def; | ||
| 24 | else { | ||
| 25 | if(1 == sscanf(arg, "%lf", &delta)) { | ||
| 26 | if(delta + (*ratio) < .1 || delta + (*ratio) > 1.9) | ||
| 27 | return; | ||
| 28 | *ratio += delta; | ||
| 29 | } | ||
| 30 | } | ||
| 31 | lt->arrange(); | ||
| 32 | } | ||
| 33 | |||
| 34 | static double /* simple pow() */ | 16 | static double /* simple pow() */ |
| 35 | spow(double x, double y) | 17 | spow(double x, double y) |
| 36 | { | 18 | { |
| @@ -110,6 +92,24 @@ tile(void) { | |||
| 110 | 92 | ||
| 111 | LAYOUTS | 93 | LAYOUTS |
| 112 | 94 | ||
| 95 | static void | ||
| 96 | incratio(const char *arg, double *ratio, double def) { | ||
| 97 | double delta; | ||
| 98 | |||
| 99 | if(lt->arrange != tile) | ||
| 100 | return; | ||
| 101 | if(!arg) | ||
| 102 | *ratio = def; | ||
| 103 | else { | ||
| 104 | if(1 == sscanf(arg, "%lf", &delta)) { | ||
| 105 | if(delta + (*ratio) < .1 || delta + (*ratio) > 1.9) | ||
| 106 | return; | ||
| 107 | *ratio += delta; | ||
| 108 | } | ||
| 109 | } | ||
| 110 | lt->arrange(); | ||
| 111 | } | ||
| 112 | |||
| 113 | /* extern */ | 113 | /* extern */ |
| 114 | 114 | ||
| 115 | void | 115 | void |
