~ubuntu-branches/debian/lenny/libgsf/lenny

« back to all changes in this revision

Viewing changes to gsf/gsf-infile.c

  • Committer: Bazaar Package Importer
  • Author(s): J.H.M. Dassen (Ray)
  • Date: 2006-11-06 22:45:03 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20061106224503-g6pmv1m82zy8jya9
Tags: 1.14.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 *
16
16
 * You should have received a copy of the GNU Lesser General Public License
17
17
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
19
19
 * USA
20
20
 */
21
21
 
48
48
 * @i      :
49
49
 *
50
50
 * Returns the utf8 encoded name of the @i-th child
51
 
 * NOTE : DO NOT FREE THE STRING
 
51
 * <emphasis>DO NOT FREE THE STRING.</emphasis>
52
52
 **/
53
53
char const *
54
54
gsf_infile_name_by_index (GsfInfile *infile, int i)
77
77
        res = GET_CLASS (infile)->child_by_index (infile, i, &err);
78
78
 
79
79
        if (err != NULL) {
 
80
                char const *iname = gsf_input_name (GSF_INPUT (infile));
80
81
                g_warning ("Unable to get child[%d] for infile '%s' because : %s",
81
 
                           i, gsf_input_name (GSF_INPUT (infile)), err->message);
 
82
                           i, iname ? iname : "?", err->message);
82
83
                g_error_free (err);
83
84
                g_return_val_if_fail (res == NULL, NULL); /* be anal */
84
85
        }
106
107
        res = GET_CLASS (infile)->child_by_name (infile, name, &err);
107
108
 
108
109
        if (err != NULL) {
 
110
                char const *iname = gsf_input_name (GSF_INPUT (infile));
109
111
                g_warning ("Unable to get child['%s'] for infile '%s' because : %s",
110
 
                           name, gsf_input_name (GSF_INPUT (infile)), err->message);
 
112
                           name, iname ? iname : "?", err->message);
111
113
                g_error_free (err);
112
114
                g_return_val_if_fail (res == NULL, NULL); /* be anal */
113
115
        }