Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/lamont/src/lib/common/util.c
ViewVC logotype

Annotation of /branches/lamont/src/lib/common/util.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3349 - (view) (download) (as text)

1 : jhr 1978 /*! \file util.c
2 :     *
3 :     * \author John Reppy
4 :     */
5 :    
6 :     /*
7 : jhr 3349 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
8 :     *
9 :     * COPYRIGHT (c) 2015 The University of Chicago
10 : jhr 1978 * All rights reserved.
11 :     */
12 :    
13 :     #include "Diderot/diderot.h"
14 :     #include "teem/biff.h"
15 :    
16 :     void Diderot_Error (WorldPrefix_t *wrld, const char *fmt, ...)
17 :     {
18 :     char buf[1024];
19 :     va_list ap;
20 :    
21 :     // NOTE: if there was a biffMsg function that worked with va_lists, then we
22 :     // could avoid the buffer
23 :     va_start (ap, fmt);
24 :     vsnprintf (buf, sizeof(buf), fmt, ap);
25 :     va_end (ap);
26 :    
27 :     biffMsgAdd(wrld->errors, buf);
28 :     }
29 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0