Tagging the 0.74.4.7 release of the KiTTY project.

This commit is contained in:
cyd01
2021-03-01 09:58:45 +01:00
parent 2c7c0116da
commit ee18bc69e0
11 changed files with 78 additions and 54 deletions
+7 -6
View File
@@ -825,14 +825,13 @@ void proxy_selection_handler(union control *ctrl, dlgparam *dlg, void *data, int
* remember what the right value is supposed to be when
* operations below cause reentrant calls to this function. */
char * oldproxy = conf_get_str(conf, CONF_proxyselection);
dlg_update_start(ctrl, dlg);
dlg_listbox_clear(ctrl, dlg);
for (i = 0; i < lenof(proxies); i++) {
if( proxies[i].name==NULL ) break ;
dlg_listbox_addwithid(ctrl, dlg, proxies[i].name, proxies[i].val);
}
for (i = j = 0; i < lenof(proxies); i++) {
for (i =0, j = 0 ; i < lenof(proxies); i++) {
if( proxies[i].name==NULL ) break ;
if ( !strcmp(oldproxy,proxies[i].name) ) {
dlg_listbox_select(ctrl, dlg, i);
@@ -1410,16 +1409,18 @@ static void sessionsaver_handler(union control *ctrl, dlgparam *dlg,
selectedsession = (char*)malloc(strlen(sessionname)+1) ;
strcpy(selectedsession,sessionname);
do_defaults(sessionname, conf) ;
conf_set_str(conf,CONF_proxyselection,"- Session defined proxy -");
proxy_selection_handler(ctrlProxyList, dlg, data, EVENT_REFRESH ) ;
if( !GetPuttyFlag() && GetProxySelectionFlag() ) {
conf_set_str(conf,CONF_proxyselection,"- Session defined proxy -");
proxy_selection_handler(ctrlProxyList, dlg, data, EVENT_REFRESH ) ;
}
conf_set_str(conf,CONF_host,"");
dlg_editbox_set(ctrlHostnameEdit, dlg,"");
if( strlen(ssd->savedsession) > 0 ) {
ssd->savedsession[0]='\0' ;
dlg_refresh(ssd->editbox, dlg) ;
}
sessionsaver_handler( ctrlSessionList, dlg, data, EVENT_REFRESH ) ;
}
sessionsaver_handler( ctrlSessionList, dlg, data, EVENT_REFRESH ) ;
}
else if (!ssd->midsession && // creer un nouveau folder
ssd->createbutton && ctrl == ssd->createbutton) {
if( strlen(ssd->savedsession) > 0 ) {
+1 -1
View File
@@ -1,5 +1,5 @@
#define RELEASE 0.74
#define TEXTVER "Release 0.74"
#define SSHVER "-Release-0.74"
#define BINARY_VERSION 0,74,4,6
#define BINARY_VERSION 0,74,4,7
#define SOURCE_COMMIT "unavailable"
+1 -1
View File
@@ -1984,7 +1984,7 @@ kitty.dll: ../../kitty_dll.c kitty_dll.res.o
upx --best --compress-icons=2 kitty.dll
../../kitty_ini.h: ../../kitty_ini.txt
( printf 'static char *default_init_file_content = "' ; sed 's/\\/\\\\/g' ../../kitty_ini.txt | sed 's/$$/\\n\\/' ; printf '" ;\n' ) > ../../kitty_ini.h
( printf 'char default_init_file_content[] = "' ; sed 's/\\/\\\\/g' ../../kitty_ini.txt | sed 's/$$/\\n\\/' ; printf '" ;\n' ) > ../../kitty_ini.h
../../kitty_help.h: ../../docs/pages/CommandLine.md
( printf 'static char *default_help_file_content = "' ; sed -n '/CmdLineOptions_begin/,/CmdLineOptions_end/p' ../../docs/pages/CommandLine.md|sed 's/<!--.*-->//'|sed 's/\*\*//g'|sed 's/$$/\\r\\n\\/' ; printf '" ;\n' ) > ../../kitty_help.h
+1 -1
View File
@@ -1 +1 @@
6
7
+1 -1
View File
@@ -211,7 +211,7 @@ END
//IDD_KITTYABOUT DIALOGEX 0, 0, 240, 70
IDD_KITTYABOUT DIALOGEX 0, 0, 245, 90
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SETFONT
CAPTION "About KiTTY"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
+6 -3
View File
@@ -283,7 +283,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
GetObject(hFontTitle,sizeof(LOGFONT),&lf);
lf.lfWeight = FW_BOLD;
hFontTitle = CreateFontIndirect(&lf);
}
}
// Font setup
if (NULL == (hFontHover = (HFONT)SendDlgItemMessage(hwnd,IDC_EMAIL,WM_GETFONT,0,0)))
hFontHover = GetStockObject(DEFAULT_GUI_FONT);
@@ -977,8 +977,11 @@ void modal_about_box(HWND hwnd)
{
EnableWindow(hwnd, 0);
#if (defined MOD_PERSO) && (!defined FLJ)
if( get_param("PUTTY") ) DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutProcOrig);
else DialogBox(hinst, MAKEINTRESOURCE(IDD_KITTYABOUT), hwnd, AboutProc);
if( GetPuttyFlag() ) {
DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutProcOrig) ;
} else {
DialogBox(hinst, MAKEINTRESOURCE(IDD_KITTYABOUT), hwnd, AboutProc) ;
}
#else
DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutProc);
#endif
+7 -2
View File
@@ -1266,8 +1266,13 @@ int WINAPI Agent_WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show
if ( (fp = fopen(b, "r")) != NULL) {
putty_path = dupstr(b);
fclose(fp);
} else
putty_path = NULL;
} else {
strcpy(r, "kitty_portable.exe");
if ( (fp = fopen(b, "r")) != NULL) {
putty_path = dupstr(b);
fclose(fp);
} else putty_path = NULL;
}
}
#else
} else
+1 -1
View File
@@ -1 +1 @@
0.74.4.6
0.74.4.7
+5
View File
@@ -1260,6 +1260,11 @@ char * GetHelpMessage(void) {
void CreateIniFile( const char * filename ) {
FILE *fp;
if( (fp=fopen(filename,"w")) != NULL ) {
if( IniFileFlag == SAVEMODE_DIR ) {
int p = poss( ";savemode=registry", default_init_file_content );
del( default_init_file_content, p, 18 );
insert( default_init_file_content, "savemode=dir", p );
}
fputs(default_init_file_content,fp);
fclose(fp);
}
+8 -2
View File
@@ -272,7 +272,13 @@ int LoadParametersLight( void ) {
}
#endif
}
if( ReadParameterLight( INIT_SECTION, "fileextension", buffer ) ) {
if( strlen(buffer) > 0 ) {
if( buffer[0] != '.' ) { strcpy( FileExtension, "." ) ; } else { strcpy( FileExtension, "" ) ; }
strcat( FileExtension, buffer ) ;
while( FileExtension[strlen(FileExtension)-1]==' ' ) { FileExtension[strlen(FileExtension)-1] = '\0' ; }
}
}
if( ReadParameterLight( INIT_SECTION, "autostoresshkey", buffer ) ) { if( !stricmp( buffer, "YES" ) ) SetAutoStoreSSHKeyFlag( 1 ) ; }
if( ReadParameterLight( "Agent", "messageonkeyusage", buffer ) ) { if( !stricmp( buffer, "YES" ) ) SetShowBalloonOnKeyUsage() ; }
if( ReadParameterLight( "Agent", "askconfirmation", buffer ) ) {
@@ -283,7 +289,7 @@ int LoadParametersLight( void ) {
if( ReadParameterLight( "Agent", "scrumble", buffer ) ) { if( !stricmp( buffer, "YES" ) ) SetScrumbleKeyFlag(1) ; }
return ret ;
}
}
// Positionne un flag permettant de determiner si on est connecte
int is_backend_connected = 0 ;
+40 -36
View File
@@ -11,7 +11,7 @@ char *stristr (const char *meule_de_foin, const char *aiguille) {
free( c2 ) ;
free( c1 ) ;
return res ;
}
}
/* Fonction permettant d'inserer une chaine dans une autre */
int insert( char * ch, const char * c, const int ipos ) {
@@ -21,9 +21,9 @@ int insert( char * ch, const char * c, const int ipos ) {
if( (size_t) i > ( strlen( ch ) + 1 ) ) i = strlen( ch ) + 1 ;
for( k = strlen( ch ) ; k >= ( i - 1 ) ; k-- ) ch[k + len] = ch[k] ;
for( k = 0 ; k < len ; k++ ) ch[k + i - 1] = c[k] ;
}
return strlen( ch ) ;
}
return strlen( ch ) ;
}
/* Fonction permettant de supprimer une partie d'une chaine de caracteres */
int del( char * ch, const int start, const int length ) {
@@ -32,15 +32,18 @@ int del( char * ch, const int start, const int length ) {
if( ( start == 1 ) && ( length >= len ) ) { ch[0] = '\0' ; len = 0 ; }
if( ( start > 0 ) && ( start <= len ) && ( length > 0 ) ) {
for( k = start - 1 ; k < ( len - length ) ; k++ ) {
if( k < ( len - length ) ) ch[k] = ch[ k + length ] ;
else ch = '\0' ;
if( k < ( len - length ) ) {
ch[k] = ch[ k + length ] ;
} else {
ch[k] = '\0' ;
}
}
k = len - length ;
if( ( start + length ) > len ) k = start - 1 ;
ch[k] = '\0' ;
}
return strlen( ch ) ;
}
return strlen( ch ) ;
}
/* Fonction permettant de retrouver la position d'une chaine dans une autre chaine */
int poss( const char * c, const char * ch ) {
@@ -57,7 +60,7 @@ int poss( const char * c, const char * ch ) {
free( ch1 ) ;
free( c1 ) ;
return res ;
}
}
/* Fonction permettant de retrouver la position d'une chaîne de caracteres dans une chaine a partir d'une position donnee */
int posi( const char * c, const char * ch, const int ipos ) {
@@ -67,7 +70,7 @@ int posi( const char * c, const char * ch, const int ipos ) {
res = poss( c, ch + ( ipos - 1 ) ) ;
if( res > 0 ) return res + ( ipos -1 ) ;
else return 0 ;
}
}
// Teste l'existance d'un fichier
int existfile( const char * filename ) {
@@ -79,7 +82,7 @@ int existfile( const char * filename ) {
if( ( statBuf.st_mode & _S_IFMT ) == _S_IFREG ) { return 1 ; }
else { return 0 ; }
}
}
// Teste l'existance d'un repertoire
int existdirectory( const char * filename ) {
@@ -91,7 +94,7 @@ int existdirectory( const char * filename ) {
if( ( statBuf.st_mode & _S_IFMT ) == _S_IFDIR ) { return 1 ; }
else { return 0 ; }
}
}
/* Donne la taille d'un fichier */
long filesize( const char * filename ) {
@@ -108,7 +111,7 @@ long filesize( const char * filename ) {
fclose( fp ) ;
return length ;
}
}
// Supprime les double anti-slash
void DelDoubleBackSlash( char * st ) {
@@ -116,10 +119,10 @@ void DelDoubleBackSlash( char * st ) {
while( st[i] != '\0' ) {
if( (st[i] == '\\' )&&(st[i+1]=='\\' ) ) {
for( j=i+1 ; j<strlen( st ) ; j++ ) st[j]=st[j+1] ;
}
else i++ ;
}
else i++ ;
}
}
// Ajoute une chaine dans une liste de chaines
int StringList_Add( char **list, const char * name ) {
@@ -128,12 +131,12 @@ int StringList_Add( char **list, const char * name ) {
while( list[i] != NULL ) {
if( !stricmp( name, list[i] ) ) return 1 ;
i++ ;
}
}
if( ( list[i] = (char*) malloc( strlen( name ) + 1 ) ) == NULL ) return 0 ;
strcpy( list[i], name ) ;
list[i+1] = NULL ;
return 1 ;
}
}
// Test si une chaine existe dans une liste de chaines
int StringList_Exist( const char **list, const char * name ) {
@@ -142,9 +145,9 @@ int StringList_Exist( const char **list, const char * name ) {
if( strlen( list[i] ) > 0 )
if( !strcmp( list[i], name ) ) return 1 ;
i++ ;
}
return 0 ;
}
return 0 ;
}
// Supprime une chaine d'une liste de chaines
void StringList_Del( char **list, const char * name ) {
@@ -153,10 +156,10 @@ void StringList_Del( char **list, const char * name ) {
if( strlen( list[i] ) > 0 )
if( !strcmp( list[i], name ) ) {
strcpy( list[i], "" ) ;
}
}
i++;
}
}
}
// Reorganise l'ordre d'une liste de chaines en montant la chaine selectionnee d'un cran
void StringList_Up( char **list, const char * name ) {
@@ -174,12 +177,12 @@ void StringList_Up( char **list, const char * name ) {
list[i] = (char*) malloc( strlen( buffer ) +1 ) ;
strcpy( list[i], buffer );
free( buffer );
}
return ;
}
i++ ;
return ;
}
i++ ;
}
}
// Positionne l'environnement
int putenv (const char *string) ;
@@ -191,19 +194,21 @@ int set_env( char * name, char * value ) {
res = putenv( (const char *) buffer ) ;
free( buffer ) ;
return res ;
}
}
int add_env( char * name, char * value ) {
int res = 0 ;
char * npst = getenv( name ), * vpst = NULL ;
if( npst==NULL ) { res = set_env( name, value ) ; }
else {
if( npst==NULL ) {
res = set_env( name, value ) ;
} else {
vpst = (char*) malloc( strlen(npst)+strlen(value)+20 ) ;
sprintf( vpst, "%s=%s;%s", name, npst, value ) ;
res = set_env( name, vpst ) ;
free( vpst ) ;
}
return res ;
}
return res ;
}
// Creer un repertoire recurssif (rep1 / rep2 / ...)
int _mkdir (const char*);
@@ -218,9 +223,9 @@ int MakeDir( const char * directory ) {
if( (directory[i]=='\\')||(directory[i]=='/') ) {
fullpath[j]='\\' ;
while( (directory[i+1]==' ')||(directory[i+1]==' ') ) i++ ;
}
else fullpath[j]=directory[i] ;
}
} else
fullpath[j]=directory[i] ;
}
fullpath[j+1]='\0' ;
// On supprime les espaces, les / et les \\ à la fin
@@ -230,9 +235,9 @@ int MakeDir( const char * directory ) {
if( fullpath[i] == '\\' ) {
buffer[j]='\\' ;
while( (i>0)&&((fullpath[i-1]==' ')||(fullpath[i-1]==' ')) ) i-- ;
}
else buffer[j]=fullpath[i] ;
}
} else
buffer[j]=fullpath[i] ;
}
j++;
// On supprime les espace au début
@@ -247,10 +252,9 @@ int MakeDir( const char * directory ) {
_mkdir( fullpath ) ;
p[0]='\\' ;
pst=p+1;
}
}
_mkdir( fullpath ) ;
}
return existdirectory(fullpath) ;
}