[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-devel] Changes to qemacs/latex-mode.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-devel] Changes to qemacs/latex-mode.c |
Date: |
Wed, 11 May 2005 11:48:32 -0400 |
Index: qemacs/latex-mode.c
diff -u qemacs/latex-mode.c:1.9 qemacs/latex-mode.c:1.10
--- qemacs/latex-mode.c:1.9 Mon May 9 09:10:37 2005
+++ qemacs/latex-mode.c Wed May 11 15:48:31 2005
@@ -213,7 +213,8 @@
static void latex_cmd_run(void *opaque, char *cmd)
{
struct latex_function *func = (struct latex_function *)opaque;
- char cwd[1024];
+ char cwd[MAX_FILENAME_SIZE];
+ char dir[MAX_FILENAME_SIZE];
const char *argv[4];
char *wd, *p;
int len;
@@ -236,10 +237,8 @@
if (p == func->es->b->filename)
p++;
len = p - func->es->b->filename + 1;
- wd = (char *)malloc(len);
- pstrcpy(wd, len, func->es->b->filename);
- chdir(wd);
- free(wd);
+ pstrcpy(dir, sizeof(dir), func->es->b->filename);
+ chdir(dir);
if (func->output_to_buffer) {
/* if the buffer already exists, kill it */