mirror of https://github.com/cy384/ssheven.git
fix title setting
This commit is contained in:
parent
686a3010d1
commit
3839c5118e
|
@ -53,11 +53,11 @@ void generate_key_mapping(void)
|
|||
}
|
||||
}
|
||||
|
||||
void set_window_title(WindowPtr w, const char* c_name)
|
||||
void set_window_title(WindowPtr w, const char* c_name, size_t length)
|
||||
{
|
||||
Str255 pascal_name;
|
||||
strncpy((char *) &pascal_name[1], c_name, 254);
|
||||
pascal_name[0] = strlen(c_name);
|
||||
pascal_name[0] = length < 254 ? length : 254;
|
||||
|
||||
SetWTitle(w, pascal_name);
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ extern enum THREAD_COMMAND read_thread_command;
|
|||
extern enum THREAD_STATE read_thread_state;
|
||||
|
||||
int save_prefs(void);
|
||||
void set_window_title(WindowPtr w, const char* c_name);
|
||||
void set_window_title(WindowPtr w, const char* c_name, size_t length);
|
||||
|
||||
OSErr FSpPathFromLocation(FSSpec* spec, int* length, Handle* fullPath);
|
||||
|
||||
|
|
Loading…
Reference in New Issue