Second char from first name will act as lastname in initials

This commit is contained in:
Ianos Gnatiuc 2005-10-24 16:37:23 +00:00
parent 81300cf5a4
commit b4113e751e
2 changed files with 16 additions and 4 deletions

View File

@ -10,6 +10,8 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
+ Second char from first name will act as lastname in initials
+ Improve description of the "DispHdrLocation" config file token.
+ New menu item "Mark thread as read" added to "Mark What?" menu.

View File

@ -665,12 +665,22 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
ptr++;
if(*ptr == '@')
break;
if(*ptr) {
initials[y++] = *ptr;
if(y == 9)
if (*ptr)
{
if (y == 0)
{
initials[y++] = *ptr++;
if (*ptr) initials[y++] = *ptr++;
}
else if (y == 2)
initials[y-1] = *ptr++;
else if (y == 9)
break;
ptr++;
else
initials[y++] = *ptr++;
}
while(IsInitial(*ptr) and *ptr)
ptr++;
}