plan-be / plan-be/iode

C API: make it possible to call K_copy() by passing a input file in ASCII format

Open
#629 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C API enhancement
Dominant language
C++
Stars
2
Forks
1
Avg merge
7h 35m
Merged PRs (30d)
13

Description

The problem is that K_copy_1(...) calls K_load() where the file_type is deduced from the KDB type:

In file api/k_objfile.c, we have

static int K_copy_1(KDB* to, FNAME file, int no, char** objs, int* found, SAMPLE* smpl)
{
    int     i, pf, pt, rc = 0, nb_found = 0;
    KDB     *from;
    char    *ptr, *pack;
    SAMPLE  csmpl;

    from = K_load(KTYPE(to), file, no, objs);
    if(from == NULL) return(-1);

(...)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in api/k_objfile.c at K_copy_1(...) and trace its call to K_load(), focusing on how the file type is deduced from KTYPE(to). Determine how an ASCII input file can be accepted by K_copy(), then verify that calling K_copy() with an ASCII input file succeeds for the relevant KDB type.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.