mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-04 03:27:00 -05:00 
			
		
		
		
	...
This commit is contained in:
		
							parent
							
								
									6cdebf93f1
								
							
						
					
					
						commit
						6fd23c7ca1
					
				@ -373,7 +373,7 @@ class Win32Freeze(Command, WixMixIn):
 | 
			
		||||
        src = self.j(self.src_root, 'setup', 'installer', 'windows',
 | 
			
		||||
                'portable.c')
 | 
			
		||||
        obj = self.j(self.obj_dir, self.b(src)+'.obj')
 | 
			
		||||
        cflags  = '/c /EHsc /MT /W3 /Ox /nologo /D_UNICODE'.split()
 | 
			
		||||
        cflags  = '/c /EHsc /MT /W3 /Ox /nologo /D_UNICODE /DUNICODE'.split()
 | 
			
		||||
 | 
			
		||||
        if self.newer(obj, [src]):
 | 
			
		||||
            self.info('Compiling', obj)
 | 
			
		||||
 | 
			
		||||
@ -2,8 +2,14 @@
 | 
			
		||||
#define UNICODE
 | 
			
		||||
#endif 
 | 
			
		||||
 | 
			
		||||
#ifndef _UNICODE
 | 
			
		||||
#define _UNICODE
 | 
			
		||||
#endif 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include <tchar.h>
 | 
			
		||||
#include <wchar.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
 | 
			
		||||
#define BUFSIZE 4096
 | 
			
		||||
@ -32,7 +38,7 @@ void show_last_error_crt(LPCTSTR preamble) {
 | 
			
		||||
    int err = 0;
 | 
			
		||||
 | 
			
		||||
    _get_errno(&err);
 | 
			
		||||
    _wcserror_s(buf, BUFSIZE, err);
 | 
			
		||||
    _tcserror_s(buf, BUFSIZE, err);
 | 
			
		||||
    show_detailed_error(preamble, buf, err);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -544,7 +544,8 @@ class MobiWriter(object):
 | 
			
		||||
        '''
 | 
			
		||||
        Write the PalmDB header
 | 
			
		||||
        '''
 | 
			
		||||
        title = ascii_filename(unicode(self.oeb.metadata.title[0]))
 | 
			
		||||
        title = ascii_filename(unicode(self.oeb.metadata.title[0])).replace(
 | 
			
		||||
                ' ', '_')
 | 
			
		||||
        title = title + (b'\0' * (32 - len(title)))
 | 
			
		||||
        now = int(time.time())
 | 
			
		||||
        nrecords = len(self.records)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user