Added
Link Here
|
1 |
--- src/gnome-cmd-advrename-lexer.l.orig 2007-12-07 01:47:10.000000000 +0100 |
2 |
+++ src/gnome-cmd-advrename-lexer.l 2007-12-07 01:49:09.000000000 +0100 |
3 |
@@ -85,8 +85,8 @@ |
4 |
case 'p' : *s++ = PARENT_DIR; break; |
5 |
} |
6 |
|
7 |
- *((int *) s)++ = --from; |
8 |
- *((int *) s)++ = length; |
9 |
+ *s++ = --from; |
10 |
+ *s++ = length; |
11 |
} |
12 |
|
13 |
fname_template_size -= sizeof(char)+2*sizeof(int); |
14 |
@@ -99,7 +99,7 @@ |
15 |
precision = -1; |
16 |
sscanf(yytext+3,"%d",&precision); |
17 |
*s++ = COUNTER; |
18 |
- *((int *) s)++ = precision<MAX_PRECISION ? precision : MAX_PRECISION; |
19 |
+ *s++ = precision<MAX_PRECISION ? precision : MAX_PRECISION; |
20 |
fname_template_size -= sizeof(char)+sizeof(int); |
21 |
} |
22 |
} |
23 |
@@ -117,8 +117,8 @@ |
24 |
case 'p' : *s++ = PARENT_DIR; break; |
25 |
} |
26 |
|
27 |
- *((int *) s)++ = 0; |
28 |
- *((int *) s)++ = -1; |
29 |
+ *s++ = 0; |
30 |
+ *s++ = -1; |
31 |
|
32 |
fname_template_size -= sizeof(char)+2*sizeof(int); |
33 |
} |
34 |
@@ -128,7 +128,7 @@ |
35 |
if (fname_template_size>1+sizeof(int)) |
36 |
{ |
37 |
*s++ = COUNTER; |
38 |
- *((int *) s)++ = -1; |
39 |
+ *s++ = -1; |
40 |
fname_template_size -= sizeof(char)+sizeof(int); |
41 |
} |
42 |
} |
43 |
@@ -260,8 +260,8 @@ |
44 |
switch (*src) |
45 |
{ |
46 |
case NAME : ++src; |
47 |
- from = *((int *) src)++; |
48 |
- length = *((int *) src)++; |
49 |
+ from = *src++; |
50 |
+ length = *src++; |
51 |
mksubstr(name_len,&from,&length); |
52 |
if (length<=NAME_MAX-(dest-fmt)) |
53 |
{ |
54 |
@@ -271,8 +271,8 @@ |
55 |
break; |
56 |
|
57 |
case EXTENSION : ++src; |
58 |
- from = *((int *) src)++; |
59 |
- length = *((int *) src)++; |
60 |
+ from = *src++; |
61 |
+ length = *src++; |
62 |
mksubstr(ext_len,&from,&length); |
63 |
if (length<=NAME_MAX-(dest-fmt)) |
64 |
{ |
65 |
@@ -282,8 +282,8 @@ |
66 |
break; |
67 |
|
68 |
case FULL_NAME : ++src; |
69 |
- from = *((int *) src)++; |
70 |
- length = *((int *) src)++; |
71 |
+ from = *src++; |
72 |
+ length = *src++; |
73 |
mksubstr(full_name_len,&from,&length); |
74 |
if (length<=NAME_MAX-(dest-fmt)) |
75 |
{ |
76 |
@@ -293,8 +293,8 @@ |
77 |
break; |
78 |
|
79 |
case PARENT_DIR: ++src; |
80 |
- from = *((int *) src)++; |
81 |
- length = *((int *) src)++; |
82 |
+ from = *src++; |
83 |
+ length = *src++; |
84 |
mksubstr(parent_dir_len,&from,&length); |
85 |
if (length<=NAME_MAX-(dest-fmt)) |
86 |
{ |
87 |
@@ -304,7 +304,7 @@ |
88 |
break; |
89 |
|
90 |
case COUNTER : ++src; |
91 |
- precision = *((int *) src)++; |
92 |
+ precision = *src++; |
93 |
if (precision!=-1) |
94 |
sprintf(custom_counter_fmt,"%%0%ilu",precision); |
95 |
dest += snprintf(dest,NAME_MAX-(dest-fmt),(precision==-1 ? counter_fmt : custom_counter_fmt),counter); |