Changeset c8fcf66 in git for src/message.c


Ignore:
Timestamp:
07/03/15 10:08:31 (5 years ago)
Author:
Olly Betts <olly@…>
Branches:
line_contents, master, stereo, travis-osx
Children:
42fd3ef
Parents:
82919e07
Message:

src/avenprcore.cc,src/message.c,src/message.h: msg() has returned a
persistent copy of the message for decades, so the code's bound to
rely on that in some places. And there's no real reason it
shouldn't continue to as the messages are under 20KB of UTF-8 text
for any language, so lazy loading isn't worth the complication. So
remove msgPerm() and the unused msgFree() macro, and document that
msg() returns a persistent copy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/message.c

    r82919e07 rc8fcf66  
    11/* message.c
    22 * Fairly general purpose message and error routines
    3  * Copyright (C) 1993-2003,2004,2005,2006,2007,2010,2011,2012,2014 Olly Betts
     3 * Copyright (C) 1993-2003,2004,2005,2006,2007,2010,2011,2012,2014,2015 Olly Betts
    44 *
    55 * This program is free software; you can redistribute it and/or modify
     
    11881188}
    11891189
    1190 /* Message may be overwritten by next call
    1191  * (but not in current implementation) */
    11921190const char *
    11931191msg(int en)
     
    12211219
    12221220   return msg_array[en];
    1223 }
    1224 
    1225 /* returns persistent copy of message */
    1226 const char *
    1227 msgPerm(int en)
    1228 {
    1229    return msg(en);
    12301221}
    12311222
Note: See TracChangeset for help on using the changeset viewer.