ACC SHELL

Path : /usr/share/YaST2/modules/
File Upload :
Current File : //usr/share/YaST2/modules/Region.ycp

/**
 * File:        Region.ycp
 * Package:     yast2-storage
 * Summary:	Expert Partitioner
 * Authors:     Arvin Schnell <aschnell@suse.de>
 *
 * A region is a list of two integers, the first being the start and the
 * second the length.
 */
{
    module "Region";


    global integer Start(list<integer> a)
    {
	return a[0]:0;
    }


    global integer Length(list<integer> a)
    {
	return a[1]:0;
    }


    global integer End(list<integer> a)
    {
	return a[0]:0 + a[1]:0 - 1;
    }


    /**
     * Checks whether region b lies within region a.
     */
    global boolean Inside(list<integer> a, list<integer> b)
    {
	return Start(b) >= Start(a) && End(b) <= End(a);
    }
}

ACC SHELL 2018