Mercurial > vim
comparison src/dosinst.c @ 640:8a5a95f7ef2a v7.0185
updated for version 7.0185
author | vimboss |
---|---|
date | Sun, 22 Jan 2006 23:30:12 +0000 |
parents | f713fc55bf7b |
children | d20041a02ee5 |
comparison
equal
deleted
inserted
replaced
639:c79d4df4686e | 640:8a5a95f7ef2a |
---|---|
1192 fprintf(fd, " if arg1 =~ ' ' | let arg1 = '\"' . arg1 . '\"' | endif\n"); | 1192 fprintf(fd, " if arg1 =~ ' ' | let arg1 = '\"' . arg1 . '\"' | endif\n"); |
1193 fprintf(fd, " let arg2 = v:fname_new\n"); | 1193 fprintf(fd, " let arg2 = v:fname_new\n"); |
1194 fprintf(fd, " if arg2 =~ ' ' | let arg2 = '\"' . arg2 . '\"' | endif\n"); | 1194 fprintf(fd, " if arg2 =~ ' ' | let arg2 = '\"' . arg2 . '\"' | endif\n"); |
1195 fprintf(fd, " let arg3 = v:fname_out\n"); | 1195 fprintf(fd, " let arg3 = v:fname_out\n"); |
1196 fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n"); | 1196 fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n"); |
1197 p = strchr(installdir, ' '); | 1197 |
1198 if (p != NULL) | 1198 /* If the path has a space: When using cmd.exe (Win NT/2000/XP) put |
1199 { | 1199 * quotes around the whole command and around the diff command. |
1200 /* The path has a space. When using cmd.exe (Win NT/2000/XP) put | 1200 * Otherwise put a double quote just before the space and at the |
1201 * quotes around the whole command and around the diff command. | 1201 * end of the command. Putting quotes around the whole thing |
1202 * Otherwise put a double quote just before the space and at the | 1202 * doesn't work on Win 95/98/ME. This is mostly guessed! */ |
1203 * end of the command. Putting quotes around the whole thing | 1203 fprintf(fd, " let eq = ''\n"); |
1204 * doesn't work on Win 95/98/ME. This is mostly guessed! */ | 1204 fprintf(fd, " if $VIMRUNTIME =~ ' '\n"); |
1205 fprintf(fd, " if &sh =~ '\\<cmd'\n"); | 1205 fprintf(fd, " if &sh =~ '\\<cmd'\n"); |
1206 fprintf(fd, " silent execute '!\"\"%s\\diff\" ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . '\"'\n", installdir); | 1206 fprintf(fd, " let cmd = '\"\"' . $VIMRUNTIME . '\\diff\"'\n"); |
1207 fprintf(fd, " else\n"); | 1207 fprintf(fd, " let eq = '\"'\n"); |
1208 *p = NUL; | 1208 fprintf(fd, " else\n"); |
1209 fprintf(fd, " silent execute '!%s\" %s\\diff\" ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n", installdir, p + 1); | 1209 fprintf(fd, " let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n"); |
1210 *p = ' '; | 1210 fprintf(fd, " endif\n"); |
1211 fprintf(fd, " endif\n"); | 1211 fprintf(fd, " else\n"); |
1212 } | 1212 fprintf(fd, " let cmd = $VIMRUNTIME . '\\diff'\n"); |
1213 else | 1213 fprintf(fd, " endif\n"); |
1214 fprintf(fd, " silent execute '!%s\\diff ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n", installdir); | 1214 fprintf(fd, " silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq\n"); |
1215 | |
1215 fprintf(fd, "endfunction\n"); | 1216 fprintf(fd, "endfunction\n"); |
1216 fprintf(fd, "\n"); | 1217 fprintf(fd, "\n"); |
1217 } | 1218 } |
1218 fclose(fd); | 1219 fclose(fd); |
1219 printf("%s has been written\n", fname); | 1220 printf("%s has been written\n", fname); |