Mercurial > vim
comparison src/gui_w32.c @ 537:e321639cfa3e
updated for version 7.0152
author | vimboss |
---|---|
date | Fri, 30 Sep 2005 21:20:29 +0000 |
parents | a5fcf36ef512 |
children | 7fe13e0f5dce |
comparison
equal
deleted
inserted
replaced
536:c1d5993c7d9f | 537:e321639cfa3e |
---|---|
1969 if (pad_size != Columns || padding == NULL || padding[0] != gui.char_width) | 1969 if (pad_size != Columns || padding == NULL || padding[0] != gui.char_width) |
1970 { | 1970 { |
1971 vim_free(padding); | 1971 vim_free(padding); |
1972 pad_size = Columns; | 1972 pad_size = Columns; |
1973 | 1973 |
1974 padding = (int *)alloc(pad_size * sizeof(int)); | 1974 /* Don't give an out-of-memory message here, it would call us |
1975 * recursively. */ | |
1976 padding = (int *)lalloc(pad_size * sizeof(int), FALSE); | |
1975 if (padding != NULL) | 1977 if (padding != NULL) |
1976 for (i = 0; i < pad_size; i++) | 1978 for (i = 0; i < pad_size; i++) |
1977 padding[i] = gui.char_width; | 1979 padding[i] = gui.char_width; |
1978 } | 1980 } |
1979 | 1981 |
2005 || (enc_codepage > 0 && (int)GetACP() != enc_codepage) | 2007 || (enc_codepage > 0 && (int)GetACP() != enc_codepage) |
2006 || enc_latin9) | 2008 || enc_latin9) |
2007 && (unicodebuf == NULL || len > unibuflen)) | 2009 && (unicodebuf == NULL || len > unibuflen)) |
2008 { | 2010 { |
2009 vim_free(unicodebuf); | 2011 vim_free(unicodebuf); |
2010 unicodebuf = (WCHAR *)alloc(len * sizeof(WCHAR)); | 2012 unicodebuf = (WCHAR *)lalloc(len * sizeof(WCHAR), FALSE); |
2011 | 2013 |
2012 vim_free(unicodepdy); | 2014 vim_free(unicodepdy); |
2013 unicodepdy = (int *)alloc(len * sizeof(int)); | 2015 unicodepdy = (int *)lalloc(len * sizeof(int), FALSE); |
2014 | 2016 |
2015 unibuflen = len; | 2017 unibuflen = len; |
2016 } | 2018 } |
2017 | 2019 |
2018 if (enc_utf8 && n < len && unicodebuf != NULL) | 2020 if (enc_utf8 && n < len && unicodebuf != NULL) |
2728 } | 2730 } |
2729 if (dfltbutton >= numButtons) | 2731 if (dfltbutton >= numButtons) |
2730 dfltbutton = -1; | 2732 dfltbutton = -1; |
2731 | 2733 |
2732 /* Allocate array to hold the width of each button */ | 2734 /* Allocate array to hold the width of each button */ |
2733 buttonWidths = (int *) lalloc(numButtons * sizeof(int), TRUE); | 2735 buttonWidths = (int *)lalloc(numButtons * sizeof(int), TRUE); |
2734 if (buttonWidths == NULL) | 2736 if (buttonWidths == NULL) |
2735 return -1; | 2737 return -1; |
2736 | 2738 |
2737 /* Allocate array to hold the X position of each button */ | 2739 /* Allocate array to hold the X position of each button */ |
2738 buttonPositions = (int *) lalloc(numButtons * sizeof(int), TRUE); | 2740 buttonPositions = (int *)lalloc(numButtons * sizeof(int), TRUE); |
2739 if (buttonPositions == NULL) | 2741 if (buttonPositions == NULL) |
2740 return -1; | 2742 return -1; |
2741 | 2743 |
2742 /* | 2744 /* |
2743 * Calculate how big the dialog must be. | 2745 * Calculate how big the dialog must be. |