Skip to content

Commit

Permalink
convert newline
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tk committed Sep 10, 2023
1 parent 43c2b18 commit 752343b
Show file tree
Hide file tree
Showing 15 changed files with 10,646 additions and 10,646 deletions.
26 changes: 13 additions & 13 deletions source/texk/texlive/windows_wrapper/calldll.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* Public domain.
* Originally written by Akira Kakuto <[email protected]>
*
* DLL calling main program for TeX & Co
* DLLPROC must be defined in the Makefile as,
* e.g., -DDLLPROC=dlltexmain.
*/

__declspec(dllimport) DLLPROC(int ac, char **av);
int main(int ac, char **av)
{
return (DLLPROC(ac, av));
}
/* Public domain.
* Originally written by Akira Kakuto <[email protected]>
*
* DLL calling main program for TeX & Co
* DLLPROC must be defined in the Makefile as,
* e.g., -DDLLPROC=dlltexmain.
*/

__declspec(dllimport) DLLPROC(int ac, char **av);
int main(int ac, char **av)
{
return (DLLPROC(ac, av));
}
86 changes: 43 additions & 43 deletions source/texk/texlive/windows_wrapper/callexe.c
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
/* Public domain.
* Originally written by Akira Kakuto <[email protected]>
*
* WIN32 wrapper program replacing Unix symlinks such as,
* e.g., ofm2opl -> omfonts.
*
* EXEPROG must be defined in the Makefile as,
* e.g., -DEXEPROG=\"omfonts.exe\".
*/
#include <stdio.h>
#include <stdlib.h>
#include <process.h>
#include <string.h>
#include <malloc.h>

static int is_include_space(char *s)
{
char *p;
p = strchr(s, ' ');
if(p) return 1;
p = strchr(s, '\t');
if(p) return 1;
return 0;
}

int main(int argc, char *argv[])
{
int i;
char *p;

for(i = 0; i < argc; i++) {
if(is_include_space(argv[i])) {
p = (char *)malloc(strlen(argv[i])+3);
strcpy(p, "\"");
strcat(p, argv[i]);
strcat(p, "\"");
free(argv[i]);
argv[i] = p;
}
}
argv[argc] = NULL;
return _spawnvp(_P_WAIT, EXEPROG, (const char * const *)argv);
}
/* Public domain.
* Originally written by Akira Kakuto <[email protected]>
*
* WIN32 wrapper program replacing Unix symlinks such as,
* e.g., ofm2opl -> omfonts.
*
* EXEPROG must be defined in the Makefile as,
* e.g., -DEXEPROG=\"omfonts.exe\".
*/
#include <stdio.h>
#include <stdlib.h>
#include <process.h>
#include <string.h>
#include <malloc.h>

static int is_include_space(char *s)
{
char *p;
p = strchr(s, ' ');
if(p) return 1;
p = strchr(s, '\t');
if(p) return 1;
return 0;
}

int main(int argc, char *argv[])
{
int i;
char *p;

for(i = 0; i < argc; i++) {
if(is_include_space(argv[i])) {
p = (char *)malloc(strlen(argv[i])+3);
strcpy(p, "\"");
strcat(p, argv[i]);
strcat(p, "\"");
free(argv[i]);
argv[i] = p;
}
}
argv[argc] = NULL;
return _spawnvp(_P_WAIT, EXEPROG, (const char * const *)argv);
}
Loading

0 comments on commit 752343b

Please sign in to comment.