source: roaraudio/libroar/config.c @ 5791:cfd78ecb471f

Last change on this file since 5791:cfd78ecb471f was 5791:cfd78ecb471f, checked in by phi, 11 years ago

added configured path prefix-ckport

File size: 16.8 KB
RevLine 
[2477]1//config.c:
2
3/*
[5381]4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2012
[2477]5 *
6 *  This file is part of libroar a part of RoarAudio,
7 *  a cross-platform sound system for both, home and professional use.
8 *  See README for details.
9 *
10 *  This file is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License version 3
12 *  as published by the Free Software Foundation.
13 *
14 *  libroar is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this software; see the file COPYING.  If not, write to
[3517]21 *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 *  Boston, MA 02110-1301, USA.
[2477]23 *
24 *  NOTE for everyone want's to change something and send patches:
25 *  read README and HACKING! There a addition information on
26 *  the license of this document you need to read before you send
27 *  any patches.
28 *
29 *  NOTE for uses of non-GPL (LGPL,...) software using libesd, libartsc
30 *  or libpulse*:
31 *  The libs libroaresd, libroararts and libroarpulse link this lib
32 *  and are therefore GPL. Because of this it may be illigal to use
33 *  them with any software that uses libesd, libartsc or libpulse*.
34 */
35
36#include "libroar.h"
37
[2895]38static struct roar_libroar_config_codec *
[5357]39           roar_libroar_config_codec_get_conf(int32_t codec, int create, struct roar_libroar_config * config);
[2895]40
41
[2478]42struct roar_libroar_config * roar_libroar_get_config_ptr(void) {
43 static struct roar_libroar_config config;
[3218]44 static int    inited = 0;
45 static char   authfile[1024];
[4517]46 const  char * home = roar_env_get_home(0);
[2478]47
48 if ( !inited ) {
49  memset(&config, 0, sizeof(config));
[2567]50
[4779]51#ifdef ROAR_SUPPORT_TRAP
[5373]52  config.trap_policy      = ROAR_TRAP_IGNORE;
[4779]53#endif
[5373]54  config.opmode           = ROAR_LIBROAR_CONFIG_OPMODE_NORMAL;
55  config.server           = NULL;
56  config.authfile         = NULL;
57  config.forkapi          = NULL;
58  config.connect_internal = NULL;
59  config.daemonimage      = NULL;
[5465]60  config.protocolversion  = -1; // use default.
[3218]61
62  if ( home != NULL ) {
[5373]63   snprintf(authfile, sizeof(authfile)-1, "%s/.roarauth", home);
64   authfile[sizeof(authfile)-1] = 0;
[3375]65   config.authfile    = authfile;
[4348]66   config.serversfile = NULL;
[3218]67  }
[2567]68
[2478]69  inited++;
70 }
71
72 return &config;
73}
74
75struct roar_libroar_config * roar_libroar_get_config(void) {
76 struct roar_libroar_config * config = roar_libroar_get_config_ptr();
77 static int inited = 0;
[5754]78 const char * next;
79 char * buf;
[2478]80
81 if ( !inited ) {
[5201]82  inited++; // we do this early so we can use ROAR_{DBG,INFO,WARN,ERR}() in roar_libroar_config_parse().
83
[5754]84  next = roar_env_get("ROAR_OPTIONS");
[2480]85
[2884]86  if ( next != NULL ) {
[5754]87   if ( (buf = roar_mm_strdup(next)) != NULL ) {
88    roar_libroar_config_parse(buf, " ");
89    roar_mm_free(buf);
90   }
[2480]91  }
[2478]92 }
93
94 return config;
95}
96
[5010]97int    roar_libroar_reset_config(void) {
98 struct roar_libroar_config * config = roar_libroar_get_config_ptr();
99
100 if ( config->codecs.codec != NULL ) {
101  roar_mm_free(config->codecs.codec);
102  config->codecs.num = 0;
103 }
104
105 return 0;
106}
107
[2890]108#define _P_FP(v)   ((int)(atof((v))*256.0))
109#define _P_INT(v)  (atoi((v)))
110#define _P_BOOL(v) (*(v) == 'y' || *(v) == 'j' || *(v) == 't' || *(v) == '1' ? 1 : 0)
111
112static int roar_libroar_config_parse_codec(struct roar_libroar_config * config, char * txt) {
113 struct roar_libroar_config_codec * codec_cfg;
[5357]114 int32_t codec;
[2890]115 char * codec_str, * option_str, * value_str;
[5006]116 char * toksave = NULL;
[2890]117
[2912]118 ROAR_DBG("roar_libroar_config_parse_codec(config=%p, txt='%s') = ?", config, txt);
119
[2890]120 if ( config == NULL || txt == NULL )
121  return -1;
122
[2912]123 ROAR_DBG("roar_libroar_config_parse_codec(config=%p, txt='%s') = ?", config, txt);
124
[5006]125 codec_str = roar_mm_strtok_r(txt, ":", &toksave);
[2890]126
[2892]127 if ( codec_str == NULL )
128  return -1;
129
[5006]130 option_str = roar_mm_strtok_r(NULL, ":", &toksave);
[2890]131
132 if ( option_str == NULL )
133  return -1;
134
[5006]135 value_str = roar_mm_strtok_r(NULL, ":", &toksave);
[2890]136
137 if ( value_str == NULL )
138  return -1;
139
[2912]140 ROAR_DBG("roar_libroar_config_parse_codec(config=%p, txt='%s') = ?", config, txt);
141
[2890]142 if ( (codec = roar_str2codec(codec_str)) == -1 ) {
143  ROAR_WARN("roar_libroar_config_parse_codec(*): Unknown codec: %s", codec_str);
144  return -1;
145 }
146
[2912]147 ROAR_DBG("roar_libroar_config_parse_codec(config=%p, txt='%s'): codec=%i", config, txt, codec);
148
[2893]149 if ( (codec_cfg = roar_libroar_config_codec_get_conf(codec, 1, config)) == NULL )
[2890]150  return -1;
151
[2912]152 ROAR_DBG("roar_libroar_config_parse_codec(config=%p, txt='%s'): codec=%i, codec_cfg=%p", config, txt, codec, codec_cfg);
153
[2890]154 if ( !strcmp(option_str, "q") || !strcmp(option_str, "quality") ) {
155  codec_cfg->para_set |= ROAR_LIBROAR_CONFIG_PSET_Q;
156  codec_cfg->q = _P_FP(value_str);
157 } else if ( !strcmp(option_str, "complexity") ) {
158  codec_cfg->para_set |= ROAR_LIBROAR_CONFIG_PSET_COMPLEXITY;
159  codec_cfg->complexity = _P_FP(value_str);
160 } else if ( !strcmp(option_str, "dtx") ) {
161  codec_cfg->para_set |= ROAR_LIBROAR_CONFIG_PSET_DTX;
162  codec_cfg->dtx = _P_BOOL(value_str);
163 } else if ( !strcmp(option_str, "cc-max") ) {
164  codec_cfg->para_set |= ROAR_LIBROAR_CONFIG_PSET_MAX_CC;
165  codec_cfg->max_cc = _P_INT(value_str);
[2926]166 } else if ( !strcmp(option_str, "vbr") ) {
167  codec_cfg->para_set |= ROAR_LIBROAR_CONFIG_PSET_VBR;
168  codec_cfg->vbr = _P_BOOL(value_str);
[2962]169 } else if ( !strcmp(option_str, "mode") ) {
170  if ( !strcmp(value_str, "nb") ) {
171   codec_cfg->para_set |= ROAR_LIBROAR_CONFIG_PSET_MODE;
172   codec_cfg->mode      = ROAR_LIBROAR_CONFIG_MODE_NB;
173  } else if ( !strcmp(value_str, "wb") ) {
174   codec_cfg->para_set |= ROAR_LIBROAR_CONFIG_PSET_MODE;
175   codec_cfg->mode      = ROAR_LIBROAR_CONFIG_MODE_WB;
176  } else if ( !strcmp(value_str, "uwb") ) {
177   codec_cfg->para_set |= ROAR_LIBROAR_CONFIG_PSET_MODE;
178   codec_cfg->mode      = ROAR_LIBROAR_CONFIG_MODE_UWB;
179  } else {
180   ROAR_WARN("roar_libroar_config_parse_codec(*): Unknown codec mode: %s", value_str);
181   return -1;
182  }
[2890]183 } else {
[2891]184  ROAR_WARN("roar_libroar_config_parse_codec(*): Unknown codec option: %s", option_str);
[2892]185  return -1;
[2890]186 }
187
[2892]188 return 0;
[2890]189}
190
[2884]191int    roar_libroar_config_parse(char * txt, char * delm) {
192 struct roar_libroar_config * config = roar_libroar_get_config_ptr();
[5006]193 ssize_t len;
[2884]194 char * k, * v, * next = txt;
195
196 while (next != NULL) {
197  k = next;
[2886]198
199  if ( delm == NULL ) {
200   // no delm -> we have only one option
201   next = NULL;
202  } else {
203   next = strstr(next, delm);
204  }
205
[2884]206  if ( next != NULL ) {
207   *next = 0;
208    next++;
209  }
210
[2888]211  ROAR_DBG("roar_libroar_config_parse(*): k='%s'", k);
212
[2887]213  // strip leading spaces:
214  while ( *k == ' ' ) k++;
215
[2888]216  ROAR_DBG("roar_libroar_config_parse(*): k='%s'", k);
217
[2887]218  // strip tailing new lions:
[5006]219  len = roar_mm_strlen(k);
220  if ( len != -1 )
221   for (len--; len && (k[len] == '\r' || k[len] == '\n'); len--)
222    k[len] = 0;
[2887]223
[2888]224  ROAR_DBG("roar_libroar_config_parse(*): k='%s'", k);
225
[2887]226  // comments
227  if ( *k == '#' )
228   continue;
229
[2888]230  ROAR_DBG("roar_libroar_config_parse(*): k='%s'", k);
231
[2887]232  // empty options:
233  if ( *k == 0 )
234   continue;
235
[2884]236  if ( (v = strstr(k, ":")) != NULL ) {
237   *v = 0;
238    v++;
239  }
240
[2888]241  ROAR_DBG("roar_libroar_config_parse(*): k='%s', v='%s'", k, v);
242
[2884]243  if ( !strcmp(k, "workaround") ) {
244   if ( !strcmp(v, "use-execed") ) {
245    config->workaround.workarounds |= ROAR_LIBROAR_CONFIG_WAS_USE_EXECED;
[4653]246   } else if ( !strcmp(v, "no-slp") ) {
247    config->workaround.workarounds |= ROAR_LIBROAR_CONFIG_WAS_NO_SLP;
[2884]248   } else {
[2888]249    ROAR_WARN("roar_libroar_config_parse(*): Unknown workaround option: %s", v);
[2884]250   }
251  } else if ( !strcmp(k, "warning") || !strcmp(k, "warn") ) {
252   if ( !strcmp(v, "sysio") ) {
253    config->warnings.sysio = ROAR_WARNING_ALWAYS;
[3855]254   } else if ( !strcmp(v, "obsolete") ) {
255    config->warnings.obsolete = ROAR_WARNING_ALWAYS;
256   } else if ( !strcmp(v, "all") ) {
257    config->warnings.sysio    = ROAR_WARNING_ALWAYS;
258    config->warnings.obsolete = ROAR_WARNING_ALWAYS;
[2884]259   } else {
[2888]260    ROAR_WARN("roar_libroar_config_parse(*): Unknown warning option: %s", v);
[2884]261   }
[5183]262  } else if ( !strcmp(k, "opmode") ) {
263   if ( !strcmp(v, "normal") ) {
264    config->opmode = ROAR_LIBROAR_CONFIG_OPMODE_NORMAL;
265   } else if ( !strcmp(v, "funny") ) {
266    config->opmode = ROAR_LIBROAR_CONFIG_OPMODE_FUNNY;
[5202]267   } else if ( !strcmp(v, "ms") ) {
268    config->opmode = ROAR_LIBROAR_CONFIG_OPMODE_MS;
[5183]269   } else {
270    ROAR_WARN("roar_libroar_config_parse(*): Unknown opmode: %s", v);
271   }
[4779]272#ifdef ROAR_SUPPORT_TRAP
273  } else if ( !strcmp(k, "trap-policy") ) {
274   if ( !strcmp(v, "ignore") ) {
275    config->trap_policy = ROAR_TRAP_IGNORE;
276   } else if ( !strcmp(v, "warn") ) {
277    config->trap_policy = ROAR_TRAP_WARN;
278   } else if ( !strcmp(v, "abort") ) {
279    config->trap_policy = ROAR_TRAP_ABORT;
280#ifdef SIGKILL
281   } else if ( !strcmp(v, "kill") ) {
282    config->trap_policy = ROAR_TRAP_KILL;
283#endif
284#ifdef SIGSTOP
285   } else if ( !strcmp(v, "stop") ) {
286    config->trap_policy = ROAR_TRAP_STOP;
287#endif
[4784]288   } else if ( !strcmp(v, "die") ) {
289    config->trap_policy = ROAR_TRAP_DIE;
[4779]290   } else {
291    ROAR_WARN("roar_libroar_config_parse(*): Unknown trap policy: %s", v);
292   }
293#endif
[3136]294  } else if ( !strcmp(k, "force-rate") ) {
[5466]295   config->info.rate = roar_str2rate(v);
[3136]296  } else if ( !strcmp(k, "force-bits") ) {
[5466]297   config->info.bits = roar_str2bits(v);
[3136]298  } else if ( !strcmp(k, "force-channels") ) {
[5466]299   config->info.channels = roar_str2channels(v);
[3136]300  } else if ( !strcmp(k, "force-codec") ) {
301   config->info.codec = roar_str2codec(v);
[2890]302  } else if ( !strcmp(k, "codec") ) {
303   if ( roar_libroar_config_parse_codec(config, v) == -1 ) {
304    ROAR_WARN("roar_libroar_config_parse(*): Error parsing codec config option");
305   }
[2896]306  } else if ( !strcmp(k, "set-server") ) {
[2899]307   if ( roar_libroar_get_server() == NULL )
308    roar_libroar_set_server(v);
[3218]309  } else if ( !strcmp(k, "set-authfile") ) {
[3219]310   strncpy(config->authfile, v, 1023);
311   config->authfile[1023] = 0;
[3375]312  } else if ( !strcmp(k, "x11-display") ) {
313   config->x11.display = v;
[5373]314  } else if ( !strcmp(k, "daemonimage") ) {
315   config->daemonimage = v;
316  } else if ( !strcmp(k, "serverflags") ) {
317   if ( !strcmp(v, "nonblock") ) {
318    config->serverflags |= ROAR_ENUM_FLAG_NONBLOCK;
319   } else if ( !strcmp(v, "hardnonblock") ) {
320    config->serverflags |= ROAR_ENUM_FLAG_HARDNONBLOCK;
321   } else if ( !strcmp(v, "localonly") ) {
322    config->serverflags |= ROAR_ENUM_FLAG_LOCALONLY;
323   } else {
324    ROAR_WARN("roar_libroar_config_parse(*): Unknown serverflag: %s", v);
325   }
[5465]326  } else if ( !strcmp(k, "protocolversion") ) {
327   config->protocolversion = atoi(v);
[2884]328  } else {
[2888]329   ROAR_WARN("roar_libroar_config_parse(*): Unknown option: %s", k);
[2884]330  }
331 }
332
333 return 0;
334}
335
[5357]336struct roar_libroar_config_codec * roar_libroar_config_codec_get(int32_t codec, int create) {
[2893]337 struct roar_libroar_config * config = roar_libroar_get_config();
338 return roar_libroar_config_codec_get_conf(codec, create, config);
339}
340
341static struct roar_libroar_config_codec *
[5357]342           roar_libroar_config_codec_get_conf(int32_t codec, int create, struct roar_libroar_config * config) {
[5270]343 size_t i;
[2886]344 int need_new = 1;
345
[2912]346 ROAR_DBG("roar_libroar_config_codec_get_conf(codec=%i, create=%i, config=%p) = ?", codec, create, config);
347
[2886]348 if ( codec < 0 || create < 0 )
349  return NULL;
350
[2912]351 ROAR_DBG("roar_libroar_config_codec_get_conf(codec=%i, create=%i, config=%p) = ?", codec, create, config);
352
[2886]353 if ( config->codecs.num == 0 ) {
354  // no match case:
355  if ( !create )
356   return NULL;
357 } else {
358  for (i = 0; i < config->codecs.num; i++) {
[5357]359   if ( config->codecs.codec[i].codec == (uint32_t)codec )
[2886]360    return &(config->codecs.codec[i]);
[5270]361   if ( config->codecs.codec[i].codec == (uint32_t)-1 )
[2886]362    need_new = 0;
363  }
364 }
365
[2912]366 ROAR_DBG("roar_libroar_config_codec_get_conf(codec=%i, create=%i, config=%p) = ?", codec, create, config);
367
[2886]368 if ( !create )
369  return NULL;
370
371 if ( !need_new ) {
372  for (i = 0; i < config->codecs.num; i++) {
[5270]373   if ( config->codecs.codec[i].codec == (uint32_t)-1 ) {
[2886]374    memset(&(config->codecs.codec[i]), 0, sizeof(struct roar_libroar_config_codec));
375    config->codecs.codec[i].codec = codec;
376    return &(config->codecs.codec[i]);
377   }
378  }
379 }
380
381 if ( config->codecs.num == 0 ) {
[4957]382  config->codecs.codec = roar_mm_malloc(16*sizeof(struct roar_libroar_config_codec));
[2886]383 } else {
[4957]384  config->codecs.codec = roar_mm_realloc(config->codecs.codec, (config->codecs.num+16)*sizeof(struct roar_libroar_config_codec));
[2886]385 }
386
387 if ( config->codecs.codec == NULL )
388  return NULL;
389
390 memset(&(config->codecs.codec[config->codecs.num]), 0, 16);
391 for (i = config->codecs.num; i < (config->codecs.num+16); i++) {
[5270]392  config->codecs.codec[i].codec = (uint32_t)-1;
[2886]393 }
394
395 i = config->codecs.num;
396 config->codecs.num += 16;
397
[2913]398 memset(&(config->codecs.codec[i]), 0, sizeof(struct roar_libroar_config_codec));
399 config->codecs.codec[i].codec = codec;
400
[2886]401 return &(config->codecs.codec[i]);
402}
403
[5351]404int    roar_libroar_set_server(const char * server) {
[2567]405 roar_libroar_get_config_ptr()->server = server;
406 return 0;
407}
408
[5351]409const char * roar_libroar_get_server(void) {
[2567]410 return roar_libroar_get_config_ptr()->server;
411}
[2478]412
[5758]413int    roar_libroar_set_forkapi(const struct roar_libroar_forkapi * api) {
[5373]414 roar_libroar_get_config_ptr()->forkapi = api;
415 return 0;
416}
417
418int    roar_libroar_set_connect_internal(struct roar_vio_calls * (*func)(struct roar_connection * con, const char * server, int type, int flags, uint_least32_t timeout)) {
419 roar_libroar_get_config_ptr()->connect_internal = func;
420 return 0;
421}
422
[3855]423void   roar_libroar_nowarn(void) {
424 roar_libroar_get_config_ptr()->nowarncounter++;
425}
426
427void   roar_libroar_warn(void) {
428 struct roar_libroar_config * cfg = roar_libroar_get_config_ptr();
429
430 if ( cfg->nowarncounter == 0 ) {
431  ROAR_WARN("roar_libroar_warn(): Re-Enabling already enabled warnings! (Application error?)");
432  return;
433 }
434
435 cfg->nowarncounter--;
436}
437
[5747]438static const struct {
439 const char * name;
440 const char * path;
441 const int    with_product;
442 const int    with_provider;
443} __paths[] = {
444 {"prefix",     ROAR_PREFIX, 0, 0},
445 {"prefix-bin", ROAR_PREFIX_BIN, 0, 0},
446 {"prefix-lib", ROAR_PREFIX_LIB, 0, 0},
447 {"prefix-inc", ROAR_PREFIX_INC, 0, 0},
448 {"prefix-man", ROAR_PREFIX_MAN, 0, 0},
449 {"prefix-pc",  ROAR_PREFIX_PC, 0, 0},
[5791]450 {"prefix-ckport",  ROAR_PREFIX_CKPORT, 0, 0},
[5747]451 {"prefix-comp-libs", ROAR_PREFIX_COMP_LIBS, 0, 0},
452 {"prefix-comp-bins", ROAR_PREFIX_COMP_BINS, 0, 0},
453 {"prefix-plugins", ROAR_PREFIX_PLUGINS, 1, 1},
454 {"prefix-buildsystem", ROAR_PREFIX_BUILDSYSTEM, 0, 0}
455};
456
457static int __product2path(char * path, size_t pathlen, int null_as_universal, const char * product) {
458 const char * c;
459 const char * e;
460 const char * s;
461 const char * b;
462
463 if ( product == NULL ) {
464  if ( null_as_universal ) {
465   snprintf(path, pathlen, "/universal/universal");
466  } else {
467   path[0] = 0;
468  }
469  return 0;
470 }
471
472 b = strstr(product, " ");
473 c = strstr(product, "<");
474 e = strstr(product, ">");
475
476 if ( b == NULL || c == NULL || e == NULL || c < b || e < c ) {
477  roar_err_set(ROAR_ERROR_ILLSEQ);
478  return -1;
479 }
480
481 c++;
482
483 s = strstr(c, "/");
484
485 if ( s == NULL ) {
486  snprintf(path, pathlen, "/unreg-%.*s/%.*s", (int)(size_t)(e-c), c, (int)(size_t)(b-product), product);
487 } else {
488  snprintf(path, pathlen, "/%.*s-%.*s/%.*s", (int)(size_t)(s-c), c, (int)(size_t)(e-s-1), s+1, (int)(size_t)(b-product), product);
489 }
490
491 return 0;
492}
493
494static int __provider2path(char * path, size_t pathlen, const char * provider) {
495 const char * c;
496 const char * e;
497 const char * s;
498
499 if ( provider == NULL ) {
500  path[0] = 0;
501  return 0;
502 }
503
504 c = strstr(provider, "<");
505 e = strstr(provider, ">");
506
507 if ( c == NULL || e == NULL || e < c ) {
508  roar_err_set(ROAR_ERROR_ILLSEQ);
509  return -1;
510 }
511
512 c++;
513
514 s = strstr(c, "/");
515
516 if ( s == NULL ) {
517  snprintf(path, pathlen, "/unreg-%.*s", (int)(size_t)(e-c), c);
518 } else {
519  snprintf(path, pathlen, "/%.*s-%.*s", (int)(size_t)(s-c), c, (int)(size_t)(e-s-1), s+1);
520 }
521
522 return 0;
523
524 roar_err_set(ROAR_ERROR_NOTSUP);
525 return -1;
526}
527
528char * roar_libroar_get_path(const char * name, int null_as_universal, const char * product, const char * provider) {
529 char buf_product[1024];
530 char buf_provider[1024];
531 ssize_t len_prefix, len_product, len_provider;
532 size_t i;
533 char * ret, * p;
534
535 if ( name == NULL ) {
536  roar_err_set(ROAR_ERROR_NOENT);
537  return NULL;
538 }
539
540 for (i = 0; i < (sizeof(__paths)/sizeof(*__paths)); i++) {
541  if ( !!strcmp(__paths[i].name, name) )
542   continue;
543
544  if ( ((null_as_universal || product != NULL) && !__paths[i].with_product) ||
545       (provider != NULL && !__paths[i].with_provider) ) {
546   roar_err_set(ROAR_ERROR_INVAL);
547   return NULL;
548  }
549
550  if ( __product2path(buf_product, sizeof(buf_product), null_as_universal, product) == -1 )
551   return NULL;
552
553  if ( __provider2path(buf_provider, sizeof(buf_provider), provider) == -1 )
554   return NULL;
555
556  len_prefix = roar_mm_strlen(__paths[i].path);
557  len_product = roar_mm_strlen(buf_product);
558  len_provider = roar_mm_strlen(buf_provider);
559
560  p = ret = roar_mm_malloc(len_prefix+len_product+len_provider+1);
561  if ( ret == NULL )
562   return NULL;
563
564  memcpy(p, __paths[i].path, len_prefix);
565  p += len_prefix;
566  if ( p[-1] == '/' )
567   p--;
568  memcpy(p, buf_product, len_product);
569  p += len_product;
570  memcpy(p, buf_provider, len_provider);
571  p += len_provider;
572
573  *p = 0;
574
575  return ret;
576 }
577
578 roar_err_set(ROAR_ERROR_NOENT);
579 return NULL;
580}
581
[2477]582//ll
Note: See TracBrowser for help on using the repository browser.