Coverage Report

Created: 2025-06-09 07:02

/src/gdal/netcdf-c-4.7.4/libdispatch/dnotnc4.c
Line
Count
Source (jump to first uncovered line)
1
/* Copyright 2018, UCAR/Unidata See netcdf/COPYRIGHT file for copying
2
 * and redistribution conditions.*/
3
/**
4
 * @file
5
 * @internal This file contains functions that return NC_ENOTNC4, for
6
 * dispatch layers that only implement the classic model.
7
 *
8
 * @author Ed Hartnett
9
 */
10
11
#include "netcdf.h"
12
#include "netcdf_filter.h"
13
#include "ncdispatch.h"
14
#include "nc4internal.h"
15
16
/**
17
 * @internal Not allowed for classic model.
18
 *
19
 * @param ncid Ignored.
20
 * @param varid Ignored.
21
 * @param id Ignored.
22
 * @param nparams Ignored.
23
 * @param parms Ignored.
24
 *
25
 * @return ::NC_ENOTNC4 Not allowed for classic model.
26
 * @author Ed Hartnett
27
 */
28
int
29
NC_NOTNC4_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams,
30
                         const unsigned int* parms)
31
0
{
32
0
    return NC_ENOTNC4;
33
0
}
34
35
36
/**
37
 * @internal Not allowed for classic model.
38
 *
39
 * @param parent_ncid Ignored.
40
 * @param name Ignored.
41
 * @param new_ncid Ignored.
42
 *
43
 * @return ::NC_ENOTNC4 Not allowed for classic model.
44
 * @author Ed Hartnett
45
 */
46
int
47
NC_NOTNC4_def_grp(int parent_ncid, const char *name, int *new_ncid)
48
0
{
49
0
    return NC_ENOTNC4;
50
0
}
51
52
/**
53
 * @internal Not allowed for classic model.
54
 *
55
 * @param grpid Ignored.
56
 * @param name Ignored.
57
 *
58
 * @return ::NC_ENOTNC4 Not allowed for classic model.
59
 * @author Ed Hartnett
60
 */
61
int
62
NC_NOTNC4_rename_grp(int grpid, const char *name)
63
0
{
64
0
    return NC_ENOTNC4;
65
0
}
66
67
/**
68
 * @internal Not allowed for classic model.
69
 *
70
 * @param ncid Ignored.
71
 * @param size Ignored.
72
 * @param name Ignored.
73
 * @param typeidp Ignored.
74
 *
75
 * @return ::NC_ENOTNC4 Not allowed for classic model.
76
 * @author Ed Hartnett
77
 */
78
int
79
NC_NOTNC4_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp)
80
0
{
81
0
    return NC_ENOTNC4;
82
0
}
83
84
/**
85
 * @internal Not allowed for classic model.
86
 *
87
 * @param ncid Ignored.
88
 * @param typeid1 Ignored.
89
 * @param name Ignored.
90
 * @param offset Ignored.
91
 * @param field Ignored.
92
 *
93
 * @return ::NC_ENOTNC4 Not allowed for classic model.
94
 * @author Ed Hartnett
95
 */
96
int
97
NC_NOTNC4_insert_compound(int ncid, nc_type typeid1, const char *name, size_t offset,
98
                          nc_type field_typeid)
99
0
{
100
0
    return NC_ENOTNC4;
101
0
}
102
103
/**
104
 * @internal Not allowed for classic model.
105
 *
106
 * @param ncid Ignored.
107
 * @param typeid1 Ignored.
108
 * @param name Ignored.
109
 * @param offset Ignored.
110
 * @param field Ignored.
111
 * @param ndims Ignored.
112
 * @param dim Ignored.
113
 *
114
 * @return ::NC_ENOTNC4 Not allowed for classic model.
115
 * @author Ed Hartnett
116
 */
117
extern int
118
NC_NOTNC4_insert_array_compound(int ncid, int typeid1, const char *name,
119
                                size_t offset, nc_type field_typeid,
120
                                int ndims, const int *dim_sizesp)
121
0
{
122
0
    return NC_ENOTNC4;
123
0
}
124
125
/**
126
 * @internal Not allowed for classic model.
127
 *
128
 * @param ncid Ignored.
129
 * @param typeid1 Ignored.
130
 * @param fieldid Ignored.
131
 * @param name Ignored.
132
 * @param offsetp Ignored.
133
 * @param field Ignored.
134
 * @param ndimsp Ignored.
135
 * @param dim Ignored.
136
 *
137
 * @return ::NC_ENOTNC4 Not allowed for classic model.
138
 * @author Ed Hartnett
139
 */
140
int
141
NC_NOTNC4_inq_compound_field(int ncid, nc_type typeid1, int fieldid, char *name,
142
                             size_t *offsetp, nc_type *field_typeidp, int *ndimsp,
143
                             int *dim_sizesp)
144
0
{
145
0
    return NC_ENOTNC4;
146
0
}
147
148
/**
149
 * @internal Not allowed for classic model.
150
 *
151
 * @param ncid Ignored.
152
 * @param typeid1 Ignored.
153
 * @param name Ignored.
154
 * @param fieldidp Ignored.
155
 *
156
 * @return ::NC_ENOTNC4 Not allowed for classic model.
157
 * @author Ed Hartnett
158
 */
159
int
160
NC_NOTNC4_inq_compound_fieldindex(int ncid, nc_type typeid1, const char *name, int *fieldidp)
161
0
{
162
0
    return NC_ENOTNC4;
163
0
}
164
165
/* Opaque type. */
166
167
/**
168
 * @internal Not allowed for classic model.
169
 *
170
 * @param ncid Ignored.
171
 * @param datum Ignored.
172
 * @param name Ignored.
173
 * @param typeidp Ignored.
174
 *
175
 * @return ::NC_ENOTNC4 Not allowed for classic model.
176
 * @author Ed Hartnett
177
 */
178
int
179
NC_NOTNC4_def_opaque(int ncid, size_t datum_size, const char *name,
180
                     nc_type *typeidp)
181
0
{
182
0
    return NC_ENOTNC4;
183
0
}
184
185
/**
186
 * @internal Not allowed for classic model.
187
 *
188
 * @param ncid Ignored.
189
 * @param name Ignored.
190
 * @param base_typeid Ignored.
191
 * @param typeidp Ignored.
192
 *
193
 * @return ::NC_ENOTNC4 Not allowed for classic model.
194
 * @author Ed Hartnett
195
 */
196
int
197
NC_NOTNC4_def_vlen(int ncid, const char *name, nc_type base_typeid,
198
                   nc_type *typeidp)
199
0
{
200
0
    return NC_ENOTNC4;
201
0
}
202
203
/**
204
 * @internal Not allowed for classic model.
205
 *
206
 * @param ncid Ignored.
207
 * @param base_typeid Ignored.
208
 * @param name Ignored.
209
 * @param typeidp Ignored.
210
 *
211
 * @return ::NC_ENOTNC4 Not allowed for classic model.
212
 * @author Ed Hartnett
213
 */
214
int
215
NC_NOTNC4_def_enum(int ncid, nc_type base_typeid, const char *name,
216
                   nc_type *typeidp)
217
0
{
218
0
    return NC_ENOTNC4;
219
0
}
220
221
222
/**
223
 * @internal Not allowed for classic model.
224
 *
225
 * @param ncid Ignored.
226
 * @param xtype Ignored.
227
 * @param value Ignored.
228
 * @param identifier Ignored.
229
 *
230
 * @return ::NC_ENOTNC4 Not allowed for classic model.
231
 * @author Ed Hartnett
232
 */
233
int
234
NC_NOTNC4_inq_enum_ident(int ncid, nc_type xtype, long long value, char *identifier)
235
0
{
236
0
    return NC_ENOTNC4;
237
0
}
238
239
/**
240
 * @internal Not allowed for classic model.
241
 *
242
 * @param ncid Ignored.
243
 * @param typeid1 Ignored.
244
 * @param idx Ignored.
245
 * @param identifier Ignored.
246
 * @param value Ignored.
247
 *
248
 * @return ::NC_ENOTNC4 Not allowed for classic model.
249
 * @author Ed Hartnett
250
 */
251
int
252
NC_NOTNC4_inq_enum_member(int ncid, nc_type typeid1, int idx, char *identifier,
253
                          void *value)
254
0
{
255
0
    return NC_ENOTNC4;
256
0
}
257
258
/**
259
 * @internal Not allowed for classic model.
260
 *
261
 * @param ncid Ignored.
262
 * @param typeid1 Ignored.
263
 * @param identifier Ignored.
264
 * @param value Ignored.
265
 *
266
 * @return ::NC_ENOTNC4 Not allowed for classic model.
267
 * @author Ed Hartnett
268
 */
269
int
270
NC_NOTNC4_insert_enum(int ncid, nc_type typeid1, const char *identifier,
271
                      const void *value)
272
0
{
273
0
    return NC_ENOTNC4;
274
0
}
275
276
/**
277
 * @internal Not allowed for classic model.
278
 *
279
 * @param ncid Ignored.
280
 * @param typeid1 Ignored.
281
 * @param vlen_element Ignored.
282
 * @param len Ignored.
283
 * @param data Ignored.
284
 *
285
 * @return ::NC_NOERR No error.
286
 * @author Ed Hartnett
287
 */
288
int
289
NC_NOTNC4_put_vlen_element(int ncid, int typeid1, void *vlen_element,
290
                           size_t len, const void *data)
291
0
{
292
0
    return NC_ENOTNC4;
293
0
}
294
295
/**
296
 * @internal Not allowed for classic model.
297
 *
298
 * @param ncid Ignored.
299
 * @param typeid1 Ignored.
300
 * @param vlen_element Ignored.
301
 * @param len Ignored.
302
 * @param data Ignored.
303
 *
304
 * @return ::NC_ENOTNC4 Not allowed for classic model.
305
 * @author Ed Hartnett
306
 */
307
int
308
NC_NOTNC4_get_vlen_element(int ncid, int typeid1, const void *vlen_element,
309
                           size_t *len, void *data)
310
0
{
311
0
    return NC_ENOTNC4;
312
0
}
313
314
/**
315
 * @internal Not allowed for classic model.
316
 *
317
 * @param ncid Ignored.
318
 * @param varid Ignored.
319
 * @param size Ignored.
320
 * @param nelems Ignored.
321
 * @param preemption Ignored.
322
 *
323
 * @return ::NC_ENOTNC4 Not allowed for classic model.
324
 * @author Ed Hartnett
325
 */
326
int
327
NC_NOTNC4_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems,
328
                              float preemption)
329
0
{
330
0
    return NC_ENOTNC4;
331
0
}
332
333
/**
334
 * @internal Not allowed for classic model.
335
 *
336
 * @param ncid Ignored.
337
 * @param varid Ignored.
338
 * @param sizep Ignored.
339
 * @param nelemsp Ignored.
340
 * @param preemptionp Ignored.
341
 *
342
 * @return ::NC_ENOTNC4 Not allowed for classic model.
343
 * @author Ed Hartnett
344
 */
345
int
346
NC_NOTNC4_get_var_chunk_cache(int ncid, int varid, size_t *sizep,
347
                              size_t *nelemsp, float *preemptionp)
348
0
{
349
0
    return NC_ENOTNC4;
350
0
}
351
352
/**
353
 * @internal Not allowed for classic model.
354
 *
355
 * @param ncid Ignored.
356
 * @param varid Ignored.
357
 * @param shuffle Ignored.
358
 * @param deflate Ignored.
359
 * @param deflate_level Ignored.
360
 *
361
 * @return ::NC_ENOTNC4 Not allowed for classic model.
362
 * @author Ed Hartnett, Dennis Heimbigner
363
 */
364
int
365
NC_NOTNC4_def_var_deflate(int ncid, int varid, int shuffle, int deflate,
366
                          int deflate_level)
367
0
{
368
0
    return NC_ENOTNC4;
369
0
}
370
371
/**
372
 * @internal Not allowed for classic model.
373
 *
374
 * @param ncid Ignored.
375
 * @param varid Ignored.
376
 * @param fletcher32 Ignored.
377
 *
378
 * @return ::NC_ENOTNC4 Not allowed for classic model.
379
 * @author Ed Hartnett, Dennis Heimbigner
380
 */
381
int
382
NC_NOTNC4_def_var_fletcher32(int ncid, int varid, int fletcher32)
383
0
{
384
0
    return NC_ENOTNC4;
385
0
}
386
387
/**
388
 * @internal Not allowed for classic model.
389
 *
390
 * @param ncid Ignored.
391
 * @param varid Ignored.
392
 * @param contiguous Ignored.
393
 * @param chunksizesp Ignored.
394
 *
395
 * @return ::NC_ENOTNC4 Not allowed for classic model.
396
 * @author Ed Hartnett, Dennis Heimbigner
397
 */
398
int
399
NC_NOTNC4_def_var_chunking(int ncid, int varid, int contiguous, const size_t *chunksizesp)
400
0
{
401
0
    return NC_EPERM;
402
0
}
403
404
405
/**
406
 * @internal Not allowed for classic model.
407
 *
408
 * @param ncid Ignored.
409
 * @param varid Ignored.
410
 * @param endianness Ignored.
411
 *
412
 * @return ::NC_ENOTNC4 Not allowed for classic model.
413
 * @author Ed Hartnett
414
 */
415
int
416
NC_NOTNC4_def_var_endian(int ncid, int varid, int endianness)
417
0
{
418
0
    return NC_ENOTNC4;
419
0
}
420
421
/**
422
 * @internal Not allowed for classic model.
423
 *
424
 * @param ncid Ignored.
425
 * @param varid Ignored.
426
 * @param par_access Ignored.
427
 *
428
 * @return ::NC_ENOTNC4 Not allowed for classic model.
429
 * @author Ed Hartnett, Dennis Heimbigner
430
 */
431
int
432
NC_NOTNC4_var_par_access(int ncid, int varid, int par_access)
433
0
{
434
0
    return NC_ENOTNC4;
435
0
}
436
437
/**
438
 * @internal Not allowed for classic model.
439
 *
440
 * @param ncid Ignored.
441
 * @param name Ignored.
442
 * @param grp_ncid Ignored.
443
 *
444
 * @return ::NC_ENOTNC4 Not allowed for classic model.
445
 * @author Ed Hartnett
446
 */
447
int
448
NC_NOTNC4_inq_ncid(int ncid, const char *name, int *grp_ncid)
449
0
{
450
0
    return NC_ENOTNC4;
451
0
}
452
453
/**
454
 * @internal Not allowed for classic model.
455
 *
456
 * @param ncid Ignored.
457
 * @param numgrps Ignored.
458
 * @param ncids Ignored.
459
 *
460
 * @return ::NC_ENOTNC4 Not allowed for classic model.
461
 * @author Ed Hartnett
462
 */
463
int
464
NC_NOTNC4_inq_grps(int ncid, int *numgrps, int *ncids)
465
0
{
466
0
    return NC_ENOTNC4;
467
0
}
468
469
/**
470
 * @internal Not allowed for classic model.
471
 *
472
 * @param ncid Ignored.
473
 * @param name Ignored.
474
475
 * @return ::NC_ENOTNC4 Not allowed for classic model.
476
 * @author Ed Hartnett
477
 */
478
int
479
NC_NOTNC4_inq_grpname(int ncid, char *name)
480
0
{
481
0
    return NC_ENOTNC4;
482
0
}
483
484
/**
485
 * @internal Not allowed for classic model.
486
 *
487
 * @param ncid Ignored.
488
 * @param lenp Ignored.
489
 * @param full_name Ignored.
490
 *
491
 * @return ::NC_ENOTNC4 Not allowed for classic model.
492
 * @author Ed Hartnett
493
 */
494
int
495
NC_NOTNC4_inq_grpname_full(int ncid, size_t *lenp, char *full_name)
496
0
{
497
0
    return NC_ENOTNC4;
498
0
}
499
500
/**
501
 * @internal Not allowed for classic model.
502
 *
503
 * @param ncid Ignored.
504
 * @param parent_ncid Ignored.
505
 *
506
 * @return ::NC_ENOTNC4 Not allowed for classic model.
507
 * @author Ed Hartnett
508
 */
509
int
510
NC_NOTNC4_inq_grp_parent(int ncid, int *parent_ncid)
511
0
{
512
0
    return NC_ENOTNC4;
513
0
}
514
515
/**
516
 * @internal Not allowed for classic model.
517
 *
518
 * @param ncid Ignored.
519
 * @param full_name Ignored.
520
 * @param grp_ncid Ignored.
521
 *
522
 * @return ::NC_ENOTNC4 Not allowed for classic model.
523
 * @author Ed Hartnett
524
 */
525
int
526
NC_NOTNC4_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
527
0
{
528
0
    return NC_ENOTNC4;
529
0
}
530
531
/**
532
 * @internal Not allowed for classic model.
533
 *
534
 * @param ncid Ignored.
535
 * @param nvars Ignored.
536
 * @param varids Ignored.
537
 *
538
 * @return ::NC_ENOTNC4 Not allowed for classic model.
539
 * @author Ed Hartnett
540
 */
541
int
542
NC_NOTNC4_inq_varids(int ncid, int *nvars, int *varids)
543
0
{
544
0
    return NC_ENOTNC4;
545
0
}
546
547
/**
548
 * @internal Not allowed for classic model.
549
 *
550
 * @param ncid Ignored.
551
 * @param ndims Ignored.
552
 * @param dimids Ignored.
553
 * @param include_parents Ignored.
554
 *
555
 * @return ::NC_ENOTNC4 Not allowed for classic model.
556
 * @author Ed Hartnett
557
 */
558
int
559
NC_NOTNC4_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
560
0
{
561
0
    return NC_ENOTNC4;
562
0
}
563
564
/**
565
 * @internal Not allowed for classic model.
566
 *
567
 * @param ncid Ignored.
568
 * @param ntypes Ignored.
569
 * @param typeids Ignored.
570
 *
571
 * @return ::NC_ENOTNC4 Not allowed for classic model.
572
 * @author Ed Hartnett
573
 */
574
int
575
NC_NOTNC4_inq_typeids(int ncid, int *ntypes, int *typeids)
576
0
{
577
0
    return NC_ENOTNC4;
578
0
}
579
580
/**
581
 * @internal Not allowed for classic model.
582
 *
583
 * @param ncid Ignored.
584
 * @param typeid1 Ignored.
585
 * @param name Ignored.
586
 * @param size Ignored.
587
 * @param base_nc_typep Ignored.
588
 * @param nfieldsp Ignored.
589
 * @param classp Ignored.
590
 *
591
 * @return ::NC_ENOTNC4 Not allowed for classic model.
592
 * @author Ed Hartnett
593
 */
594
int
595
NC_NOTNC4_inq_user_type(int ncid, nc_type typeid1, char *name, size_t *size,
596
                        nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
597
0
{
598
0
    return NC_ENOTNC4;
599
0
}
600
601
/**
602
 * @internal Get the id of a type from the name.
603
 *
604
 * @param ncid Ignored.
605
 * @param name Ignored.
606
 * @param typeidp Ignored.
607
 *
608
 * @return ::NC_ENOTNC4 Not allowed for classic model.
609
 * @author Ed Hartnett
610
 */
611
int
612
NC_NOTNC4_inq_typeid(int ncid, const char *name, nc_type *typeidp)
613
0
{
614
0
    return NC_ENOTNC4;
615
0
}
616
617
/**
618
 * @internal Carry out one of several filter actions
619
 *
620
 * @param ncid Containing group id
621
 * @param varid Containing variable id
622
 * @param action Action to perform
623
 *
624
 * @return ::NC_ENOTNC4 Not allowed for classic model.
625
 * @author D. Heimbigner
626
 */
627
int
628
NC_NOTNC4_filter_actions(int ncid, int varid, int action, struct NC_Filterobject* spec)
629
0
{
630
0
    return NC_ENOTNC4;
631
0
}