Remove sprintf call - this won't compile on many platforms.
[nedit.git] / source / file.h
blob3c0b5b1a97bfc824891a1a1135bd05c603b6b92d
1 /* $Id: file.h,v 1.15 2004/11/09 21:58:44 yooden Exp $ */
2 /*******************************************************************************
3 * *
4 * file.h -- Nirvana Editor File Header File *
5 * *
6 * Copyright 2004 The NEdit Developers *
7 * *
8 * This is free software; you can redistribute it and/or modify it under the *
9 * terms of the GNU General Public License as published by the Free Software *
10 * Foundation; either version 2 of the License, or (at your option) any later *
11 * version. In addition, you may distribute versions of this program linked to *
12 * Motif or Open Motif. See README for details. *
13 * *
14 * This software is distributed in the hope that it will be useful, but WITHOUT *
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
17 * more details. *
18 * *
19 * You should have received a copy of the GNU General Public License along with *
20 * software; if not, write to the Free Software Foundation, Inc., 59 Temple *
21 * Place, Suite 330, Boston, MA 02111-1307 USA *
22 * *
23 * Nirvana Text Editor *
24 * July 31, 2001 *
25 * *
26 *******************************************************************************/
28 #ifndef NEDIT_FILE_H_INCLUDED
29 #define NEDIT_FILE_H_INCLUDED
31 #include "nedit.h"
33 #include <X11/Intrinsic.h>
35 /* flags for EditExistingFile */
36 #define CREATE 1
37 #define SUPPRESS_CREATE_WARN 2
38 #define PREF_READ_ONLY 4
40 #define PROMPT_SBC_DIALOG_RESPONSE 0
41 #define YES_SBC_DIALOG_RESPONSE 1
42 #define NO_SBC_DIALOG_RESPONSE 2
44 WindowInfo *EditNewFile(WindowInfo *inWindow, char *geometry, int iconic,
45 const char *languageMode, const char *defaultPath);
46 WindowInfo *EditExistingFile(WindowInfo *inWindow, const char *name,
47 const char *path, int flags, char *geometry, int iconic,
48 const char *languageMode, int tabbed, int bgOpen);
49 void RevertToSaved(WindowInfo *window);
50 int SaveWindow(WindowInfo *window);
51 int SaveWindowAs(WindowInfo *window, const char *newName, int addWrap);
52 int CloseAllFilesAndWindows(void);
53 int CloseFileAndWindow(WindowInfo *window, int preResponse);
54 void PrintWindow(WindowInfo *window, int selectedOnly);
55 void PrintString(const char *string, int length, Widget parent, const char *jobName);
56 int WriteBackupFile(WindowInfo *window);
57 int IncludeFile(WindowInfo *window, const char *name);
58 int PromptForExistingFile(WindowInfo *window, char *prompt, char *fullname);
59 int PromptForNewFile(WindowInfo *window, char *prompt, char *fullname,
60 int *fileFormat, int *addWrap);
61 int CheckReadOnly(WindowInfo *window);
62 void RemoveBackupFile(WindowInfo *window);
63 void UniqueUntitledName(char *name);
64 void CheckForChangesToFile(WindowInfo *window);
66 #endif /* NEDIT_FILE_H_INCLUDED */